community.docker/tests/integration/targets/docker_plugin/tasks/tests/basic.yml
Felix Fontein a4539a309e
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml (#430)
* Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml.

* ignore.txt lines cannot be empty or contain only a comment.

* Cleanup.

* This particular __init__.py seems to be crucial.

* Try extra newline.

* Markdown comments are a real mess. I hope this won't break Galaxy...

* More licenses.

* Add sanity test.

* Skip some files, lint.

* Make sure there is a copyright line everywhere.

* Also check for copyright line in sanity tests.

* Remove colon after 'Copyright'.

* Normalize lint script.

* Avoid colon after 'Copyright' in lint script.

* Improve license checker.

* Update README.md

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>

* Remove superfluous space.

* Referencing target instead of symlink

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>
2022-07-20 07:45:33 +02:00

85 lines
1.9 KiB
YAML

---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Registering plugin name
set_fact:
plugin_name: "{{ name_prefix }}"
- name: Registering container name
set_fact:
plugin_names: "{{ plugin_names + [plugin_name] }}"
############ basic test ############
####################################
- name: Create a plugin
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: present
register: create_1
- name: Create a plugin (Idempotent)
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: present
register: create_2
- name: Enable a plugin
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: enable
register: create_3
- name: Enable a plugin (Idempotent)
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: enable
register: create_4
- name: Disable a plugin
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: disable
register: absent_1
- name: Disable a plugin (Idempotent)
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: disable
register: absent_2
- name: Remove a plugin
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: absent
register: absent_3
- name: Remove a plugin (Idempotent)
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: absent
register: absent_4
- assert:
that:
- create_1 is changed
- create_2 is not changed
- create_3 is changed
- create_4 is not changed
- absent_1 is changed
- absent_2 is not changed
- absent_3 is changed
- absent_4 is not changed
############ Plugin_Options ############
########################################
# Integration-Test with plugin_options is in TODO-List
- name: Cleanup
docker_plugin:
plugin_name: "{{ plugin_name }}"
state: absent
force_remove: true