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.
This commit is contained in:
parent
7a0e545700
commit
59a240cd31
1 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue