tests: Speed up ssh timeout tests

pull/1060/head
Alex Willmer 3 weeks ago
parent 0ce9ffc464
commit 05d98e5b49

@ -247,6 +247,15 @@ Noteworthy Differences
part of the core library, and should therefore be straightforward to fix as
part of 0.2.x.
* Connection and become timeouts are applied differently. Mitogen may consider
a connection to have timed out, when Ansible would have waited longer or
indefinately. For example if SSH authentication completes within the
timeout, but execution of login scripts exceeds it - then Mitogen will
consider the task to have timed out and that host to have failed.
..
tests/ansible/integration/ssh/timeouts.yml covers (some of) this behaviour.
..
* SSH and ``become`` are treated distinctly when applying timeouts, and
timeouts apply up to the point when the new interpreter is ready to accept

@ -1,7 +1,12 @@
# Ensure 'ssh' connections time out correctly.
# mitogen__slow_user performs a long sleep in ~/.profile.
# Mitogen counts this time towards the connection timeout. Ansible doesn't.
# ansible_python_interpreter=python3000 is an optimisation, to avoid waiting
# on the timeout multiple times (e.g. interpreter discovery).
- name: integration/ssh/timeouts.yml
hosts: test-targets
gather_facts: false
tasks:
- include_tasks: ../_mitogen_only.yml
@ -17,6 +22,7 @@
test-targets
-m custom_python_detect_environment
-e ansible_user=mitogen__slow_user -e ansible_password=slow_user_password
-e ansible_python_interpreter=python3000
args:
chdir: ../..
register: out

@ -43,6 +43,7 @@
test-targets
-e ansible_ssh_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password
-e ansible_python_interpreter=python3000
args:
chdir: ../..
register: out
@ -82,6 +83,7 @@
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_ssh_pass=wrong_password
-e ansible_python_interpreter=python3000
args:
chdir: ../..
register: out
@ -121,6 +123,7 @@
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_password=wrong_password
-e ansible_python_interpreter=python3000
args:
chdir: ../..
register: out
@ -165,6 +168,7 @@
test-targets
-e ansible_user=mitogen__has_sudo
-e ansible_ssh_private_key_file=/dev/null
-e ansible_python_interpreter=python3000
args:
chdir: ../..
register: out

Loading…
Cancel
Save