[coverage] improve test coverage for indexed_items lookup (#74548)
This commit is contained in:
parent
244bf9c640
commit
4f0a9488bb
1 changed files with 16 additions and 0 deletions
|
@ -14,3 +14,19 @@
|
|||
- "x2 == 'set'"
|
||||
- "x3 == 'set'"
|
||||
- "x4 == 'set'"
|
||||
|
||||
- block:
|
||||
- name: "EXPECTED FAILURE - test not a list"
|
||||
debug:
|
||||
msg: "{{ item.0 }} is {{ item.1 }}"
|
||||
with_indexed_items:
|
||||
"a": 1
|
||||
|
||||
- fail:
|
||||
msg: "should not get here"
|
||||
|
||||
rescue:
|
||||
- assert:
|
||||
that:
|
||||
- ansible_failed_task.name == "EXPECTED FAILURE - test not a list"
|
||||
- ansible_failed_result.msg == "with_indexed_items expects a list"
|
||||
|
|
Loading…
Reference in a new issue