diff --git a/tests/ansible/integration/runner/custom_binary_single_null.yml b/tests/ansible/integration/runner/custom_binary_single_null.yml index d8a1af0c..8e215bf3 100644 --- a/tests/ansible/integration/runner/custom_binary_single_null.yml +++ b/tests/ansible/integration/runner/custom_binary_single_null.yml @@ -17,8 +17,8 @@ - "out.results[0].msg.startswith('MODULE FAILURE')" - "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: Exec format error\r\n') + 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') # Can't test this: Mitogen returns 126, 2.5.x returns 126, 2.4.x discarded the diff --git a/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml b/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml index 9f7d08ba..77f2cb5c 100644 --- a/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml +++ b/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml @@ -5,13 +5,13 @@ tasks: - custom_python_new_style_missing_interpreter: foo: true - with_sequence: start=1 end={{end|default(1)}} + with_sequence: start=0 end={{end|default(1)}} register: out - assert: - that: | - (not out.changed) and - (not out.results[0].changed) and - out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and - out.results[0].msg == 'Here is my input' - + that: + - "not out.changed" + - "not out.results[0].changed" + # Random breaking interface change since 2.7.x + #- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo" + - "out.results[0].msg == 'Here is my input'" diff --git a/tests/ansible/integration/runner/custom_python_new_style_module.yml b/tests/ansible/integration/runner/custom_python_new_style_module.yml index d86bff4a..0d29d0ac 100644 --- a/tests/ansible/integration/runner/custom_python_new_style_module.yml +++ b/tests/ansible/integration/runner/custom_python_new_style_module.yml @@ -4,16 +4,16 @@ tasks: - custom_python_new_style_module: foo: true - with_sequence: start=1 end={{end|default(1)}} + with_sequence: start=0 end={{end|default(1)}} register: out - assert: - that: | - (not out.changed) and - (not out.results[0].changed) and - out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and - out.results[0].msg == 'Here is my input' - + that: + - "not out.changed" + - "not out.results[0].changed" + # Random breaking interface change since 2.7.x + #- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo" + - "out.results[0].msg == 'Here is my input'" # Verify sys.argv is not Unicode. - custom_python_detect_environment: diff --git a/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py b/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py index 66264010..eea4baa4 100644 --- a/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py +++ b/tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py @@ -17,3 +17,7 @@ print(" \"changed\": false,") print(" \"msg\": \"Here is my input\",") print(" \"input\": [%s]" % (input_json,)) print("}") + +# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module +# process to exit itself. So needless. +sys.exit(0) diff --git a/tests/ansible/lib/modules/custom_python_new_style_module.py b/tests/ansible/lib/modules/custom_python_new_style_module.py index 70ee062d..f9c176c1 100755 --- a/tests/ansible/lib/modules/custom_python_new_style_module.py +++ b/tests/ansible/lib/modules/custom_python_new_style_module.py @@ -23,3 +23,7 @@ print(" \"__package__\": \"%s\"," % (__package__,)) print(" \"msg\": \"Here is my input\",") print(" \"input\": [%s]" % (input_json,)) print("}") + +# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module +# process to exit itself. So needless. +sys.exit(0)