Adding integration test to parsing for includes with params
This commit is contained in:
parent
6eac47e519
commit
4d659229ce
3 changed files with 25 additions and 0 deletions
3
test/integration/roles/test_bad_parsing/meta/main.yml
Normal file
3
test/integration/roles/test_bad_parsing/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
|
3
test/integration/roles/test_good_parsing/meta/main.yml
Normal file
3
test/integration/roles/test_good_parsing/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
|
|
@ -116,3 +116,22 @@
|
|||
that:
|
||||
# command shouldn't end in spaces, amend test once fixed
|
||||
- result.cmd == "echo foo --arg=a --arg=b"
|
||||
|
||||
- name: create a test file to include
|
||||
copy: 'dest={{ output_dir }}/test_include.yml content="- debug: var=param\n"'
|
||||
register: result
|
||||
|
||||
- name: assert that the test include file was created
|
||||
assert:
|
||||
that:
|
||||
- result.changed
|
||||
|
||||
- name: test includes with params
|
||||
include: "{{ output_dir }}/test_include.yml param={{ test_input }}"
|
||||
register: result
|
||||
|
||||
- debug: var=result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- 'result.dest == "{{ output_dir|expanduser }}/test_include.yml"'
|
||||
|
|
Loading…
Reference in a new issue