Run tests against localhost and container
Use localhost and container1 as proper targets for the test playbook rather than a combination of import_tasks/delegate_to for container1. The previous code did not run the imported tasks against container1, but instead a second time against localhost. This makes the handlers checking the output from ansible diff fail as on the second run against localhost there are no changes, giving an empty diff. Changing the test play targets to localhost:container1 makes it more obvious that the whole test playbook should be run against the host and the container. It is not clear from the old code if the original intent was to specifically test config_template tasks delegated from the host to a container. Change-Id: Ibc72868d9957567fe86a9d3205a80ec33441baff
This commit is contained in:
parent
a6347c3811
commit
62812dedc0
@ -38,7 +38,7 @@
|
|||||||
- include: common/test-prepare-containers.yml
|
- include: common/test-prepare-containers.yml
|
||||||
|
|
||||||
- name: Test config_template
|
- name: Test config_template
|
||||||
hosts: localhost
|
hosts: localhost:container1
|
||||||
connection: local
|
connection: local
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
|
|
||||||
@ -75,9 +75,6 @@
|
|||||||
|
|
||||||
- import_tasks: test-common-tasks.yml
|
- import_tasks: test-common-tasks.yml
|
||||||
|
|
||||||
- import_tasks: test-common-tasks.yml
|
|
||||||
delegate_to: container1
|
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: test_extend_yml check diff
|
- name: test_extend_yml check diff
|
||||||
assert:
|
assert:
|
||||||
|
Loading…
Reference in New Issue
Block a user