Skip to content

Commit ee7dae7

Browse files
committed
ci: Another round of fixes for random Ansible UI breakage in 2.7/2.8
1 parent d981a38 commit ee7dae7

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

tests/ansible/integration/runner/custom_binary_single_null.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
- "out.results[0].msg.startswith('MODULE FAILURE')"
1818
- "out.results[0].module_stdout.startswith('/bin/sh: ')"
1919
- |
20-
out.results[0].module_stdout.endswith('/custom_binary_single_null: cannot execute binary file\r\n') or
21-
out.results[0].module_stdout.endswith('/custom_binary_single_null: Exec format error\r\n')
20+
out.results[0].module_stdout.endswith('custom_binary_single_null: cannot execute binary file\r\n') or
21+
out.results[0].module_stdout.endswith('custom_binary_single_null: Exec format error\r\n')
2222
2323
2424
# Can't test this: Mitogen returns 126, 2.5.x returns 126, 2.4.x discarded the

tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
tasks:
66
- custom_python_new_style_missing_interpreter:
77
foo: true
8-
with_sequence: start=1 end={{end|default(1)}}
8+
with_sequence: start=0 end={{end|default(1)}}
99
register: out
1010

1111
- assert:
12-
that: |
13-
(not out.changed) and
14-
(not out.results[0].changed) and
15-
out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and
16-
out.results[0].msg == 'Here is my input'
17-
12+
that:
13+
- "not out.changed"
14+
- "not out.results[0].changed"
15+
# Random breaking interface change since 2.7.x
16+
#- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo"
17+
- "out.results[0].msg == 'Here is my input'"

tests/ansible/integration/runner/custom_python_new_style_module.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
tasks:
55
- custom_python_new_style_module:
66
foo: true
7-
with_sequence: start=1 end={{end|default(1)}}
7+
with_sequence: start=0 end={{end|default(1)}}
88
register: out
99

1010
- assert:
11-
that: |
12-
(not out.changed) and
13-
(not out.results[0].changed) and
14-
out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo and
15-
out.results[0].msg == 'Here is my input'
16-
11+
that:
12+
- "not out.changed"
13+
- "not out.results[0].changed"
14+
# Random breaking interface change since 2.7.x
15+
#- "out.results[0].input[0].ANSIBLE_MODULE_ARGS.foo"
16+
- "out.results[0].msg == 'Here is my input'"
1717

1818
# Verify sys.argv is not Unicode.
1919
- custom_python_detect_environment:

tests/ansible/lib/modules/custom_python_new_style_missing_interpreter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ def usage():
1717
print(" \"msg\": \"Here is my input\",")
1818
print(" \"input\": [%s]" % (input_json,))
1919
print("}")
20+
21+
# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module
22+
# process to exit itself. So needless.
23+
sys.exit(0)

tests/ansible/lib/modules/custom_python_new_style_module.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ def usage():
2323
print(" \"msg\": \"Here is my input\",")
2424
print(" \"input\": [%s]" % (input_json,))
2525
print("}")
26+
27+
# Ansible since 2.7.0/52449cc01a7 broke __file__ and *requires* the module
28+
# process to exit itself. So needless.
29+
sys.exit(0)

0 commit comments

Comments
 (0)