[coverage] improve test coverage for together lookup (#74549)
This commit is contained in:
parent
4f0a9488bb
commit
c6fda9fc1a
1 changed files with 15 additions and 0 deletions
|
@ -12,3 +12,18 @@
|
||||||
- "b == '2'"
|
- "b == '2'"
|
||||||
- "c == '3'"
|
- "c == '3'"
|
||||||
- "d == '4'"
|
- "d == '4'"
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: "EXPECTED FAILURE - test empty list"
|
||||||
|
debug:
|
||||||
|
msg: "{{ item.0 }} and {{ item.1 }}"
|
||||||
|
with_together: []
|
||||||
|
|
||||||
|
- fail:
|
||||||
|
msg: "should not get here"
|
||||||
|
|
||||||
|
rescue:
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- ansible_failed_task.name == "EXPECTED FAILURE - test empty list"
|
||||||
|
- ansible_failed_result.msg == "with_together requires at least one element in each list"
|
Loading…
Reference in a new issue