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/context_service/reconnection.yml

31 lines
757 B
YAML

# Test ContextService ability to handle disconnections, including handling
# cleanup of dependent (via=) contexts.
- name: integration/context_service/reconnection.yml
hosts: all
any_errors_fatal: true
tasks:
- become: true
custom_python_detect_environment:
register: old_become_env
- become: true
# This must be >1 for vanilla Ansible.
shell: |
bash -c "( sleep 3; pkill -f sshd:; ) & disown"
- connection: local
shell: sleep 3
- wait_for_connection:
- become: true
custom_python_detect_environment:
register: new_become_env
# Verify the PIDs really changed (i.e. disconnection happened)
- assert:
that:
- old_become_env.pid != new_become_env.pid