Browse Source

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
changes/61/783661/1
Jonathan Rosser 2 months ago
parent
commit
62812dedc0
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      tests/test.yml

+ 1
- 4
tests/test.yml View File

@ -38,7 +38,7 @@
- include: common/test-prepare-containers.yml
- name: Test config_template
hosts: localhost
hosts: localhost:container1
connection: local
gather_facts: yes
@ -75,9 +75,6 @@
- import_tasks: test-common-tasks.yml
- import_tasks: test-common-tasks.yml
delegate_to: container1
handlers:
- name: test_extend_yml check diff
assert:


Loading…
Cancel
Save