summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/loops
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2020-09-11 07:53:10 +0200
committerGitHub <noreply@github.com>2020-09-11 07:53:10 +0200
commit59a240cd311f5cedbcd5e12421f1d3bd596d9070 (patch)
treec17155c7149c6ab803fb3739e93a35ece64aa43c /test/integration/targets/loops
parentAdd how to run unit test link in testing_units_modules doc (#71523) (diff)
downloadansible-59a240cd311f5cedbcd5e12421f1d3bd596d9070.tar.xz
ansible-59a240cd311f5cedbcd5e12421f1d3bd596d9070.zip
Fix with_dict/with_list being passed incorrect type tests (#71699)
These tests were failing due to a variable passed being undefined instead of being of an incorrect type which is the actual intent of the tests.
Diffstat (limited to 'test/integration/targets/loops')
-rw-r--r--test/integration/targets/loops/tasks/main.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/targets/loops/tasks/main.yml b/test/integration/targets/loops/tasks/main.yml
index a44abcd07f..03c7c440d8 100644
--- a/test/integration/targets/loops/tasks/main.yml
+++ b/test/integration/targets/loops/tasks/main.yml
@@ -213,17 +213,26 @@
with_dict: "{{ a_list }}"
register: with_dict_passed_a_list
ignore_errors: True
+ vars:
+ a_list:
+ - 1
+ - 2
- assert:
that:
- with_dict_passed_a_list is failed
+ - '"with_dict expects a dict" in with_dict_passed_a_list.msg'
- debug:
msg: "with_list passed a dict: {{item}}"
with_list: "{{ a_dict }}"
register: with_list_passed_a_dict
ignore_errors: True
+ vars:
+ a_dict:
+ key: value
- assert:
that:
- with_list_passed_a_dict is failed
+ - '"with_list expects a list" in with_list_passed_a_dict.msg'
- debug:
var: "item"