diff --git a/tests/ansible/integration/all.yml b/tests/ansible/integration/all.yml index c6dcb95b..87459301 100644 --- a/tests/ansible/integration/all.yml +++ b/tests/ansible/integration/all.yml @@ -3,5 +3,6 @@ # This playbook imports all tests that are known to work at present. # +- import_playbook: connection_loader/all.yml - import_playbook: action__low_level_execute_command.yml - import_playbook: runner.yml diff --git a/tests/ansible/integration/connection_loader/all.yml b/tests/ansible/integration/connection_loader/all.yml new file mode 100644 index 00000000..7a44bb2f --- /dev/null +++ b/tests/ansible/integration/connection_loader/all.yml @@ -0,0 +1,3 @@ +- import_playbook: local_blemished.yml +- import_playbook: paramiko_unblemished.yml +- import_playbook: ssh_blemished.yml diff --git a/tests/ansible/integration/connection_loader/local_blemished.yml b/tests/ansible/integration/connection_loader/local_blemished.yml new file mode 100644 index 00000000..be9873b2 --- /dev/null +++ b/tests/ansible/integration/connection_loader/local_blemished.yml @@ -0,0 +1,14 @@ +# Ensure 'local' connections are grabbed. + +- hosts: all + any_errors_fatal: true + tasks: + - name: integration/connection_loader__local_blemished.yml + determine_strategy: + + - custom_python_detect_environment: + connection: local + register: out + + - assert: + that: out.mitogen_loaded or not is_mitogen diff --git a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml new file mode 100644 index 00000000..4959b672 --- /dev/null +++ b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml @@ -0,0 +1,12 @@ +# Ensure paramiko connections aren't grabbed. + +- hosts: all + any_errors_fatal: true + tasks: + - name: integration/connection_loader__paramiko_unblemished.yml + custom_python_detect_environment: + connection: paramiko + register: out + + - assert: + that: not out.mitogen_loaded diff --git a/tests/ansible/integration/connection_loader/ssh_blemished.yml b/tests/ansible/integration/connection_loader/ssh_blemished.yml new file mode 100644 index 00000000..6b295c7e --- /dev/null +++ b/tests/ansible/integration/connection_loader/ssh_blemished.yml @@ -0,0 +1,14 @@ +# Ensure 'ssh' connections are grabbed. + +- hosts: all + any_errors_fatal: true + tasks: + - name: integration/connection_loader__ssh_blemished.yml + determine_strategy: + + - custom_python_detect_environment: + connection: ssh + register: out + + - assert: + that: out.mitogen_loaded or not is_mitogen