From 59a240cd311f5cedbcd5e12421f1d3bd596d9070 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Fri, 11 Sep 2020 07:53:10 +0200 Subject: 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. --- test/integration/targets/loops/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/integration/targets/loops') diff --git a/test/integration/targets/loops/tasks/main.yml b/test/integration/targets/loops/tasks/main.yml index a44abcd07f..03c7c440d8 100644 --- a/test/integration/targets/loops/tasks/main.yml +++ b/test/integration/targets/loops/tasks/main.yml @@ -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" -- cgit v1.2.3