ci: Another round of fixes for random Ansible UI breakage in 2.7/2.8

pull/595/head
David Wilson 6 years ago
parent d981a382c9
commit ee7dae7514

@ -17,8 +17,8 @@
- "out.results[0].msg.startswith('MODULE FAILURE')" - "out.results[0].msg.startswith('MODULE FAILURE')"
- "out.results[0].module_stdout.startswith('/bin/sh: ')" - "out.results[0].module_stdout.startswith('/bin/sh: ')"
- | - |
out.results[0].module_stdout.endswith('/custom_binary_single_null: cannot execute binary file\r\n') or out.results[0].module_stdout.endswith('custom_binary_single_null: cannot execute binary file\r\n') or
out.results[0].module_stdout.endswith('/custom_binary_single_null: Exec format error\r\n') out.results[0].module_stdout.endswith('custom_binary_single_null: Exec format error\r\n')
# Can't test this: Mitogen returns 126, 2.5.x returns 126, 2.4.x discarded the # Can't test this: Mitogen returns 126, 2.5.x returns 126, 2.4.x discarded the

@ -5,13 +5,13 @@
tasks: tasks:
- custom_python_new_style_missing_interpreter: - custom_python_new_style_missing_interpreter:
foo: true foo: true
with_sequence: start=1 end={{end|default(1)}} with_sequence: start=0 end={{end|default(1)}}
register: out register: out
- assert: - assert:
that: | that:
(not out.changed) and - "not out.changed"
(not out.results[0].changed) and - "not out.results[0].changed"
out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and # Random breaking interface change since 2.7.x
out.results[0].msg == 'Here is my input' #- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo"
- "out.results[0].msg == 'Here is my input'"

@ -4,16 +4,16 @@
tasks: tasks:
- custom_python_new_style_module: - custom_python_new_style_module:
foo: true foo: true
with_sequence: start=1 end={{end|default(1)}} with_sequence: start=0 end={{end|default(1)}}
register: out register: out
- assert: - assert:
that: | that:
(not out.changed) and - "not out.changed"
(not out.results[0].changed) and - "not out.results[0].changed"
out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and # Random breaking interface change since 2.7.x
out.results[0].msg == 'Here is my input' #- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo"
- "out.results[0].msg == 'Here is my input'"
# Verify sys.argv is not Unicode. # Verify sys.argv is not Unicode.
- custom_python_detect_environment: - custom_python_detect_environment:

@ -17,3 +17,7 @@ print(" \"changed\": false,")
print(" \"msg\": \"Here is my input\",") print(" \"msg\": \"Here is my input\",")
print(" \"input\": [%s]" % (input_json,)) print(" \"input\": [%s]" % (input_json,))
print("}") print("}")
# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module
# process to exit itself. So needless.
sys.exit(0)

@ -23,3 +23,7 @@ print(" \"__package__\": \"%s\"," % (__package__,))
print(" \"msg\": \"Here is my input\",") print(" \"msg\": \"Here is my input\",")
print(" \"input\": [%s]" % (input_json,)) print(" \"input\": [%s]" % (input_json,))
print("}") print("}")
# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module
# process to exit itself. So needless.
sys.exit(0)

Loading…
Cancel
Save