diff options
author | Martin Krizek <martin.krizek@gmail.com> | 2020-09-11 07:53:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 07:53:10 +0200 |
commit | 59a240cd311f5cedbcd5e12421f1d3bd596d9070 (patch) | |
tree | c17155c7149c6ab803fb3739e93a35ece64aa43c /test/integration/targets/loops | |
parent | Add how to run unit test link in testing_units_modules doc (#71523) (diff) | |
download | ansible-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.yml | 9 |
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" |