mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-16 21:00:31 +00:00
* Improve unit test condition.
* Improve/fix tests.
(cherry picked from commit fdb97428a3)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -91,9 +91,9 @@
|
||||
- 'output_1.diff.before is defined'
|
||||
- 'output_1.diff.after is defined'
|
||||
- 'output_2 is changed'
|
||||
- 'output_2.actions[0] | regex_search("New Swarm cluster created: ")'
|
||||
- 'output_2.swarm_facts.JoinTokens.Manager'
|
||||
- 'output_2.swarm_facts.JoinTokens.Worker'
|
||||
- '(output_2.actions[0] | regex_search("New Swarm cluster created: ")) is truthy'
|
||||
- 'output_2.swarm_facts.JoinTokens.Manager is truthy'
|
||||
- 'output_2.swarm_facts.JoinTokens.Worker is truthy'
|
||||
- 'output_2.diff.before is defined'
|
||||
- 'output_2.diff.after is defined'
|
||||
- 'output_3 is not changed'
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
assert:
|
||||
that:
|
||||
- output_1 is changed
|
||||
- 'output_1.actions[0] | regex_search("New Swarm cluster created: ")'
|
||||
- '(output_1.actions[0] | regex_search("New Swarm cluster created: ")) is truthy'
|
||||
- output_1.diff.before is defined
|
||||
- output_1.diff.after is defined
|
||||
- output_2 is changed
|
||||
- 'output_2.actions[0] | regex_search("New Swarm cluster created: ")'
|
||||
- '(output_2.actions[0] | regex_search("New Swarm cluster created: ")) is truthy'
|
||||
- output_2.diff.before is defined
|
||||
- output_2.diff.after is defined
|
||||
- output_5 is changed
|
||||
|
||||
@@ -110,10 +110,10 @@
|
||||
- name: assert UnlockKey in swarm_facts
|
||||
assert:
|
||||
that:
|
||||
- 'output_2.swarm_facts.UnlockKey'
|
||||
- 'output_2.swarm_facts.UnlockKey is truthy'
|
||||
- 'output_3.swarm_facts.UnlockKey is none'
|
||||
- 'output_6.swarm_facts.UnlockKey is none'
|
||||
- 'output_7.swarm_facts.UnlockKey'
|
||||
- 'output_7.swarm_facts.UnlockKey is truthy'
|
||||
when: docker_py_version is version('2.7.0', '>=')
|
||||
|
||||
- assert:
|
||||
|
||||
Reference in New Issue
Block a user