1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix issues with docker_stack test:

- Leave swarm at end of test to avoid breaking docker_swarm test.
- Do not update stack to avoid error leaving swarm.
- Put test back in correct group.
This commit is contained in:
Matt Clay 2018-09-18 19:54:57 -07:00
parent ccfbed3dbc
commit 846ee7e85f
2 changed files with 22 additions and 16 deletions

View file

@ -1,4 +1,4 @@
shippable/posix/group3 shippable/posix/group2
skip/osx skip/osx
skip/freebsd skip/freebsd
destructive destructive

View file

@ -3,7 +3,7 @@
state: present state: present
advertise_addr: "{{ansible_default_ipv4.address}}" advertise_addr: "{{ansible_default_ipv4.address}}"
- name: install docker_swarm python requirements - name: install docker_stack python requirements
pip: pip:
name: jsondiff,pyyaml name: jsondiff,pyyaml
@ -59,20 +59,21 @@
that: that:
- output is changed - output is changed
- name: Update stack with YAML # FIXME: updating the stack prevents leaving the swarm on Shippable
register: output #- name: Update stack with YAML
docker_stack: # register: output
state: present # docker_stack:
name: test_stack # state: present
compose: # name: test_stack
- "{{stack_compose_base}}" # compose:
- "{{stack_compose_overrides}}" # - "{{stack_compose_base}}"
# - "{{stack_compose_overrides}}"
- name: assert test_stack correctly changed on update with yaml #
assert: #- name: assert test_stack correctly changed on update with yaml
that: # assert:
- output is changed # that:
- output.docker_stack_spec_diff == stack_update_expected_diff # - output is changed
# - output.docker_stack_spec_diff == stack_update_expected_diff
- name: Delete stack - name: Delete stack
register: output register: output
@ -97,3 +98,8 @@
assert: assert:
that: that:
- output is not changed - output is not changed
- name: Remove a Swarm cluster
docker_swarm:
state: absent
force: true