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

pull/74564/head
David Shrewsbury 4 years ago committed by GitHub
parent 4f0a9488bb
commit c6fda9fc1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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"
Loading…
Cancel
Save