tests: run disconnect_during_module.yml in subprocess

Avoid entire run failing with unreachable
issue510
David Wilson 6 years ago
parent 35092c5d35
commit 0c3e48468b

@ -0,0 +1,13 @@
# issue 352: test ability to notice disconnection during a module invocation.
---
- name: integration/connection/_disconnect_during_module.yml
hosts: test-targets
gather_facts: no
any_errors_fatal: false
tasks:
- run_once: true # don't run against localhost
shell: |
kill -9 $PPID
register: out
ignore_errors: true

@ -2,18 +2,23 @@
---
- name: integration/connection/disconnect_during_module.yml
hosts: test-targets localhost
hosts: test-targets
gather_facts: no
any_errors_fatal: false
tasks:
- run_once: true # don't run against localhost
shell: |
kill -9 $PPID
- connection: local
command: |
ansible-playbook
-i "{{inventory_file}}"
integration/connection/_disconnect_during_module.yml
args:
chdir: ../..
register: out
ignore_errors: true
- debug: var=out
- assert:
that:
- out.msg.startswith('Mitogen was disconnected from the remote environment while a call was in-progress.')
- meta: clear_host_errors
- out.rc == 4
- "'Mitogen was disconnected from the remote environment while a call was in-progress.' in out.stdout"

Loading…
Cancel
Save