You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/ansible/integration/runner/crashy_new_style_module.yml

26 lines
841 B
YAML

# issue #527: catch exceptions from crashy modules.
- name: integration/runner/crashy_new_style_module.yml
hosts: test-targets
tasks:
- custom_python_run_script:
script: kaboom
register: out
ignore_errors: true
- assert:
that:
- not out.changed
- out.rc == 1
# ansible/62d8c8fde6a76d9c567ded381e9b34dad69afcd6
- |
(ansible_version.full is version('2.7', '<') and out.msg == "MODULE FAILURE") or
(ansible_version.full is version('2.7', '>=') and
out.msg == (
"MODULE FAILURE\n" +
"See stdout/stderr for the exact error"
))
- out.module_stdout == ""
- "'Traceback (most recent call last)' in out.module_stderr"
- "\"NameError: name 'kaboom' is not defined\" in out.module_stderr"