[coverage] improve test coverage for together lookup (#74549)

This commit is contained in:
David Shrewsbury 2021-05-04 11:41:22 -04:00 committed by GitHub
parent 4f0a9488bb
commit c6fda9fc1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,3 +12,18 @@
- "b == '2'"
- "c == '3'"
- "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"