Skip to content

Commit c68b3cc

Browse files
committed
test: fix error string checking for raid failures
Recent changes to error handling changed the way the error message is reported on ansible 2.9 Signed-off-by: Rich Megginson <[email protected]>
1 parent 4436969 commit c68b3cc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/verify-role-failed.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@
4444

4545
- name: Verify correct exception or error message
4646
assert:
47-
that: msg_msg is search(__storage_failed_exception) or
47+
that: result_msg is search(__storage_failed_exception) or
48+
msg_msg is search(__storage_failed_exception) or
4849
exception is search(__storage_failed_exception) or
4950
msg_stdout is search(__storage_failed_exception) or
5051
msg_stderr is search(__storage_failed_exception) or
5152
stdout is search(__storage_failed_exception) or
5253
stderr is search(__storage_failed_exception)
5354
when: __storage_failed_exception is defined
5455
vars:
56+
result_msg: "{{ ansible_failed_result.msg | d('') }}"
5557
msg_msg: "{{ ansible_failed_result.msg.msg | d('') }}"
5658
exception: "{{ ansible_failed_result.msg.exception | d('') }}"
5759
msg_stdout: "{{ ansible_failed_result.msg.module_stdout | d('') }}"

0 commit comments

Comments
 (0)