tests: Enable stricter error handling, fix resulting failures

pull/949/head
Alex Willmer 2 years ago
parent c32577295a
commit db0ffae352

@ -1,4 +1,5 @@
[defaults] [defaults]
any_errors_fatal = true
inventory = hosts inventory = hosts
gathering = explicit gathering = explicit
strategy_plugins = ../../ansible_mitogen/plugins/strategy strategy_plugins = ../../ansible_mitogen/plugins/strategy
@ -35,6 +36,10 @@ timeout = 10
# On Travis, paramiko check fails due to host key checking enabled. # On Travis, paramiko check fails due to host key checking enabled.
host_key_checking = False host_key_checking = False
[inventory]
any_unparsed_is_failed = true
host_pattern_mismatch = error
[callback_profile_tasks] [callback_profile_tasks]
task_output_limit = 10 task_output_limit = 10

@ -1,7 +1,6 @@
- name: bench/file_transfer.yml - name: bench/file_transfer.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Make 32MiB file - name: Make 32MiB file

@ -1,6 +1,5 @@
- name: bench/loop-100-copies.yml - name: bench/loop-100-copies.yml
hosts: all hosts: all
any_errors_fatal: true
tasks: tasks:
- name: Create file tree - name: Create file tree

@ -22,9 +22,15 @@ tc-remote-addr-explicit-both ansible_ssh_host=a.b.c ansible_host=b.c.d
# password() # password()
tc-password-unset tc-password-unset
tc-password-explicit-ssh ansible_ssh_pass=ansi-ssh-pass tc-password-explicit-ssh ansible_ssh_pass=ansi-ssh-pass
tc-password-explicit-user ansible_password=ansi-pass tc-password-explicit-pass ansible_password=ansi-pass
tc-password-explicit-both ansible_password=a.b.c ansible_ssh_pass=c.b.a tc-password-explicit-both ansible_password=a.b.c ansible_ssh_pass=c.b.a
# remote_user()
tc-remote-user-unset # defaults to C.DEFAULT_REMOTE_USER
tc-remote-user-explicit-ssh ansible_ssh_user=ansi-ssh-user
tc-remote-user-explicit-user ansible_user=ansi-user
tc-remote-user-explicit-both ansible_user=a.b.c ansible_ssh_user=c.b.a
# become() # become()
tc-become-unset tc-become-unset
tc-become-set tc-become-set

@ -2,7 +2,6 @@
- name: integration/action/copy.yml - name: integration/action/copy.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- copy: - copy:
dest: /tmp/copy-tiny-file dest: /tmp/copy-tiny-file

@ -5,7 +5,6 @@
- name: integration/action/fixup_perms2__copy.yml - name: integration/action/fixup_perms2__copy.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# #
# copy module (no mode). # copy module (no mode).

@ -2,7 +2,6 @@
- name: integration/action/low_level_execute_command.yml - name: integration/action/low_level_execute_command.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# "echo -en" to test we actually hit bash shell too. # "echo -en" to test we actually hit bash shell too.

@ -9,7 +9,6 @@
- name: integration/action/make_tmp_path.yml - name: integration/action/make_tmp_path.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,7 @@
# they succeed and are cleaned up correctly. # they succeed and are cleaned up correctly.
- name: integration/action/make_tmp_path__double.yml - name: integration/action/make_tmp_path__double.yml
hosts: targets hosts: test-targets
tasks: tasks:
- mitogen_action_script: - mitogen_action_script:
script: | script: |

@ -3,7 +3,6 @@
- name: integration/action/remote_expand_user.yml - name: integration/action/remote_expand_user.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: "Find out root's homedir." - name: "Find out root's homedir."
# Runs first because it blats regular Ansible facts with junk, so # Runs first because it blats regular Ansible facts with junk, so

@ -1,7 +1,6 @@
- name: integration/action/remote_file_exists.yml - name: integration/action/remote_file_exists.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- file: - file:

@ -4,7 +4,6 @@
# #
- name: integration/action/remove_tmp_path.yml - name: integration/action/remove_tmp_path.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# #
# Use the copy module to cause a temporary directory to be created, and # Use the copy module to cause a temporary directory to be created, and

@ -2,7 +2,6 @@
- name: integration/action/synchronize.yml - name: integration/action/synchronize.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
vars: vars:
ansible_user: mitogen__has_sudo_pubkey ansible_user: mitogen__has_sudo_pubkey
ansible_become_pass: has_sudo_pubkey_password ansible_become_pass: has_sudo_pubkey_password

@ -1,7 +1,6 @@
- name: integration/action/transfer_data.yml - name: integration/action/transfer_data.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- file: - file:

@ -2,7 +2,6 @@
- name: integration/async/multiple_items_loop.yml - name: integration/async/multiple_items_loop.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: start long running ops - name: start long running ops

@ -2,7 +2,6 @@
- name: integration/async/result_binary_producing_json.yml - name: integration/async/result_binary_producing_json.yml
gather_facts: true gather_facts: true
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- block: - block:

@ -2,7 +2,6 @@
- name: integration/async/result_binary_producing_junk.yml - name: integration/async/result_binary_producing_junk.yml
gather_facts: true gather_facts: true
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- block: - block:

@ -2,7 +2,6 @@
- name: integration/async/result_shell_echo_hi.yml - name: integration/async/result_shell_echo_hi.yml
gather_facts: true gather_facts: true
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- shell: echo hi; echo there >&2 - shell: echo hi; echo there >&2

@ -2,7 +2,6 @@
- name: integration/async/runner_new_process.yml - name: integration/async/runner_new_process.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: get process ID. - name: get process ID.

@ -3,7 +3,6 @@
- name: integration/async/runner_one_job.yml - name: integration/async/runner_one_job.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Verify output of a single async job. # Verify output of a single async job.

@ -2,7 +2,6 @@
- name: integration/async/runner_timeout_then_polling.yml - name: integration/async/runner_timeout_then_polling.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Verify async-with-timeout-then-poll behaviour. # Verify async-with-timeout-then-poll behaviour.

@ -1,7 +1,6 @@
- name: integration/async/runner_two_simultaneous_jobs.yml - name: integration/async/runner_two_simultaneous_jobs.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Start 2 duplicate jobs, verify they run concurrently. # Start 2 duplicate jobs, verify they run concurrently.

@ -2,7 +2,6 @@
- name: integration/async/runner_with_polling_and_timeout.yml - name: integration/async/runner_with_polling_and_timeout.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Verify async-with-polling-and-timeout behaviour. # Verify async-with-polling-and-timeout behaviour.

@ -4,7 +4,6 @@
- name: integration/become/su_password.yml - name: integration/become/su_password.yml
hosts: test-targets hosts: test-targets
become_method: su become_method: su
any_errors_fatal: true
tasks: tasks:
- name: Ensure su password absent but required. - name: Ensure su password absent but required.

@ -1,6 +1,5 @@
- name: integration/become/sudo_flags_failure.yml - name: integration/become/sudo_flags_failure.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Verify behaviour for bad sudo flags. - name: Verify behaviour for bad sudo flags.

@ -1,6 +1,5 @@
- name: integration/become/sudo_nonexistent.yml - name: integration/become/sudo_nonexistent.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Verify behaviour for non-existent accounts. - name: Verify behaviour for non-existent accounts.

@ -2,7 +2,6 @@
- name: integration/become/sudo_nopassword.yml - name: integration/become/sudo_nopassword.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Verify we aren't root - name: Verify we aren't root

@ -2,7 +2,6 @@
- name: integration/become/sudo_password.yml - name: integration/become/sudo_password.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Ensure sudo password absent but required. - name: Ensure sudo password absent but required.

@ -2,7 +2,6 @@
- name: integration/become/sudo_requiretty.yml - name: integration/become/sudo_requiretty.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# TODO: https://github.com/dw/mitogen/issues/692 # TODO: https://github.com/dw/mitogen/issues/692

@ -4,7 +4,6 @@
- name: integration/connection/become_same_user.yml - name: integration/connection/become_same_user.yml
hosts: bsu-joe hosts: bsu-joe
gather_facts: no gather_facts: no
any_errors_fatal: true
tasks: tasks:
# bsu-joe's login user is joe, so become should be ignored. # bsu-joe's login user is joe, so become should be ignored.

@ -12,7 +12,6 @@
- name: integration/connection/disconnect_resets_connection.yml - name: integration/connection/disconnect_resets_connection.yml
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -4,7 +4,6 @@
- name: integration/connection/exec_command.yml - name: integration/connection/exec_command.yml
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
any_errors_fatal: true
tasks: tasks:
- connection_passthrough: - connection_passthrough:
method: exec_command method: exec_command

@ -2,7 +2,6 @@
- name: integration/connection/home_dir.yml - name: integration/connection/home_dir.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: "Find out root's homedir." - name: "Find out root's homedir."
# Runs first because it blats regular Ansible facts with junk, so # Runs first because it blats regular Ansible facts with junk, so

@ -4,7 +4,6 @@
- name: integration/connection/put_large_file.yml - name: integration/connection/put_large_file.yml
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
any_errors_fatal: true
vars: vars:
file_name: large-file file_name: large-file
file_size: 512 file_size: 512

@ -4,7 +4,6 @@
- name: integration/connection/put_small_file.yml - name: integration/connection/put_small_file.yml
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
any_errors_fatal: true
vars: vars:
file_name: small-file file_name: small-file
file_size: 123 file_size: 123

@ -1,5 +1,5 @@
- import_playbook: delegate_to_template.yml - import_playbook: delegate_to_template.yml
- import_playbook: local_action.yml - import_playbook: local_action.yml
- import_playbook: osa_container_standalone.yml #- import_playbook: osa_container_standalone.yml
- import_playbook: osa_delegate_to_self.yml #- import_playbook: osa_delegate_to_self.yml
- import_playbook: stack_construction.yml - import_playbook: stack_construction.yml

@ -14,7 +14,6 @@
physical_hosts: ["cd-normal-alias", "cd-normal-normal"] physical_hosts: ["cd-normal-alias", "cd-normal-normal"]
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -30,7 +30,6 @@
- hosts: cd-normal - hosts: cd-normal
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen
@ -433,6 +432,6 @@
}, },
'method': 'doas', 'method': 'doas',
}, },
] ]
tags: tags:
- stack_construction - stack_construction

@ -2,7 +2,6 @@
- name: integration/connection_loader/local_blemished.yml - name: integration/connection_loader/local_blemished.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- determine_strategy: - determine_strategy:

@ -3,7 +3,6 @@
- name: integration/connection_loader/paramiko_unblemished.yml - name: integration/connection_loader/paramiko_unblemished.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- debug: - debug:
msg: "skipped for now" msg: "skipped for now"

@ -2,7 +2,6 @@
- name: integration/connection_loader__ssh_blemished.yml - name: integration/connection_loader__ssh_blemished.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- determine_strategy: - determine_strategy:

@ -3,7 +3,6 @@
- name: integration/context_service/disconnect_cleanup.yml - name: integration/context_service/disconnect_cleanup.yml
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,6 @@
- name: integration/context_service/lru_one_target.yml - name: integration/context_service/lru_one_target.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
vars: vars:
max_interps: "{{lookup('env', 'MITOGEN_MAX_INTERPRETERS')}}" max_interps: "{{lookup('env', 'MITOGEN_MAX_INTERPRETERS')}}"
ubound: "{{max_interps|int + 1}}" ubound: "{{max_interps|int + 1}}"

@ -3,7 +3,6 @@
- name: integration/context_service/reconnection.yml - name: integration/context_service/reconnection.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- mitogen_shutdown_all: - mitogen_shutdown_all:

@ -2,7 +2,6 @@
- name: integration/context_service/remote_name.yml - name: integration/context_service/remote_name.yml
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -3,7 +3,6 @@
- name: integration/interpreter_discovery/ansible_2_8_tests.yml - name: integration/interpreter_discovery/ansible_2_8_tests.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- name: can only run these tests on ansible >= 2.8.0 - name: can only run these tests on ansible >= 2.8.0

@ -3,7 +3,6 @@
- name: integration/interpreter_discovery/complex_args.yml - name: integration/interpreter_discovery/complex_args.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- name: create temp file to source - name: create temp file to source

@ -5,7 +5,6 @@
# https://github.com/ansible/ansible/issues/14489 # https://github.com/ansible/ansible/issues/14489
- name: integration/local/cwd_preserved.yml - name: integration/local/cwd_preserved.yml
any_errors_fatal: true
hosts: test-targets hosts: test-targets
tasks: tasks:
- connection: local - connection: local

@ -3,7 +3,6 @@
- name: integration/module_utils/adjacent_to_playbook.yml - name: integration/module_utils/adjacent_to_playbook.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_external_module: - custom_python_external_module:

@ -3,7 +3,6 @@
- name: integration/module_utils/adjacent_to_playbook.yml - name: integration/module_utils/adjacent_to_playbook.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
roles: roles:
- modrole - modrole
tags: tags:

@ -2,7 +2,6 @@
- name: integration/module_utils/from_config_path.yml - name: integration/module_utils/from_config_path.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_external_module: - custom_python_external_module:

@ -2,7 +2,6 @@
- name: integration/module_utils/from_config_path.yml - name: integration/module_utils/from_config_path.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_external_pkg: - custom_python_external_pkg:

@ -1,7 +1,6 @@
- name: integration/module_utils/overrides_builtin.yml - name: integration/module_utils/overrides_builtin.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
roles: roles:
- overrides_modrole - overrides_modrole
tags: tags:

@ -4,7 +4,6 @@
- name: integration/playbook_semantics/become_flags.yml - name: integration/playbook_semantics/become_flags.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: "without -E" - name: "without -E"
@ -19,7 +18,6 @@
- become_flags - become_flags
- hosts: test-targets - hosts: test-targets
any_errors_fatal: true
become_flags: -E become_flags: -E
tasks: tasks:
- name: "with -E" - name: "with -E"

@ -1,6 +1,5 @@
- name: integration/playbook_semantics/delegate_to.yml - name: integration/playbook_semantics/delegate_to.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# #
# delegate_to, no sudo # delegate_to, no sudo

@ -2,7 +2,6 @@
- name: integration/playbook_semantics/environment.yml - name: integration/playbook_semantics/environment.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- shell: echo $SOME_ENV - shell: echo $SOME_ENV
environment: environment:

@ -3,7 +3,6 @@
- name: integration/playbook_semantics/with_items.yml - name: integration/playbook_semantics/with_items.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# TODO: https://github.com/dw/mitogen/issues/692 # TODO: https://github.com/dw/mitogen/issues/692

@ -1,7 +1,6 @@
- name: integration/runner/builtin_command_module.yml - name: integration/runner/builtin_command_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- command: hostname - command: hostname

@ -1,7 +1,6 @@
# https://github.com/dw/mitogen/issues/291 # https://github.com/dw/mitogen/issues/291
- name: integration/runner/custom_bash_hashbang_argument.yml - name: integration/runner/custom_bash_hashbang_argument.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_bash_old_style_module: - custom_bash_old_style_module:

@ -1,6 +1,5 @@
- name: integration/runner/custom_bash_old_style_module.yml - name: integration/runner/custom_bash_old_style_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_bash_old_style_module: - custom_bash_old_style_module:

@ -1,6 +1,5 @@
- name: integration/runner/custom_bash_want_json_module.yml - name: integration/runner/custom_bash_want_json_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_bash_want_json_module: - custom_bash_want_json_module:
foo: true foo: true

@ -1,6 +1,5 @@
- name: integration/runner/custom_binary_producing_json.yml - name: integration/runner/custom_binary_producing_json.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- block: - block:

@ -24,7 +24,6 @@
- hosts: test-targets - hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- assert: - assert:
that: that:

@ -10,7 +10,6 @@
- custom_binary_single_null - custom_binary_single_null
- hosts: test-targets - hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- assert: - assert:
that: that:

@ -1,6 +1,5 @@
- name: integration/runner/custom_perl_json_args_module.yml - name: integration/runner/custom_perl_json_args_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_perl_json_args_module: - custom_perl_json_args_module:
foo: true foo: true

@ -1,6 +1,5 @@
- name: integration/runner/custom_perl_want_json_module.yml - name: integration/runner/custom_perl_want_json_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_perl_want_json_module: - custom_perl_want_json_module:
foo: true foo: true

@ -1,6 +1,5 @@
- name: integration/runner/custom_python_json_args_module.yml - name: integration/runner/custom_python_json_args_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_json_args_module: - custom_python_json_args_module:
foo: true foo: true

@ -1,7 +1,6 @@
- name: integration/runner/custom_python_new_style_module.yml - name: integration/runner/custom_python_new_style_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_new_style_missing_interpreter: - custom_python_new_style_missing_interpreter:
foo: true foo: true

@ -1,6 +1,5 @@
- name: integration/runner/custom_python_new_style_module.yml - name: integration/runner/custom_python_new_style_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# without Mitogen Ansible 2.10 hangs on this play # without Mitogen Ansible 2.10 hangs on this play
- meta: end_play - meta: end_play

@ -2,7 +2,6 @@
- name: integration/runner/custom_python_prehistoric_module.yml - name: integration/runner/custom_python_prehistoric_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_prehistoric_module: - custom_python_prehistoric_module:
register: out register: out

@ -1,6 +1,5 @@
- name: integration/runner/custom_python_want_json_module.yml - name: integration/runner/custom_python_want_json_module.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_python_want_json_module: - custom_python_want_json_module:
foo: true foo: true

@ -1,6 +1,5 @@
- name: integration/runner/custom_script_interpreter.yml - name: integration/runner/custom_script_interpreter.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- custom_bash_old_style_module: - custom_bash_old_style_module:

@ -3,7 +3,6 @@
- name: integration/runner/environment_isolation.yml - name: integration/runner/environment_isolation.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:

@ -4,7 +4,6 @@
- name: integration/runner/etc_environment.yml - name: integration/runner/etc_environment.yml
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- include: _etc_environment_user.yml - include: _etc_environment_user.yml

@ -1,6 +1,5 @@
- name: integration/runner/forking_active.yml - name: integration/runner/forking_active.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Verify mitogen_task_isolation=fork triggers forking. # Verify mitogen_task_isolation=fork triggers forking.

@ -1,7 +1,6 @@
- name: integration/runner/forking_correct_parent.yml - name: integration/runner/forking_correct_parent.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
# Verify mitogen_task_isolation=fork forks from "virginal fork parent", not # Verify mitogen_task_isolation=fork forks from "virginal fork parent", not

@ -2,7 +2,6 @@
- name: integration/runner/forking_inactive.yml - name: integration/runner/forking_inactive.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: get process ID. - name: get process ID.

@ -13,9 +13,9 @@
-o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}" -o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}"
tasks: tasks:
- name: ansible_ssh_user - name: ansible_ssh_user, ansible_ssh_pass
# Remaining tests just use "ansible_user".
shell: > shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -26,7 +26,9 @@
register: out register: out
when: is_mitogen when: is_mitogen
- shell: > - name: ansible_ssh_user, wrong ansible_ssh_pass
shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -39,13 +41,15 @@
when: is_mitogen when: is_mitogen
- assert: - assert:
that: out.rc == 4 # unreachable that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen when: is_mitogen
- name: ansible_ssh_pass - name: ansible_user, ansible_ssh_pass
shell: > shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -56,7 +60,9 @@
register: out register: out
when: is_mitogen when: is_mitogen
- shell: > - name: ansible_user, wrong ansible_ssh_pass
shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -69,13 +75,15 @@
when: is_mitogen when: is_mitogen
- assert: - assert:
that: out.rc == 4 # unreachable that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen when: is_mitogen
- name: ansible_password - name: ansible_user, ansible_password
shell: > shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -86,7 +94,9 @@
register: out register: out
when: is_mitogen when: is_mitogen
- shell: > - name: ansible_user, wrong ansible_password
shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -99,18 +109,20 @@
when: is_mitogen when: is_mitogen
- assert: - assert:
that: out.rc == 4 # unreachable that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen when: is_mitogen
- name: ansible_ssh_private_key_file - name: setup ansible_ssh_private_key_file
shell: chmod 0600 ../data/docker/mitogen__has_sudo_pubkey.key shell: chmod 0600 ../data/docker/mitogen__has_sudo_pubkey.key
args: args:
chdir: ../.. chdir: ../..
- name: ansible_ssh_private_key_file - name: ansible_user, ansible_ssh_private_key_file
shell: > shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -121,7 +133,9 @@
register: out register: out
when: is_mitogen when: is_mitogen
- shell: > - name: ansible_user, wrong ansible_ssh_private_key_file
shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_STRATEGY=mitogen_linear
ANSIBLE_SSH_ARGS="" ANSIBLE_SSH_ARGS=""
ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets
@ -134,6 +148,7 @@
when: is_mitogen when: is_mitogen
- assert: - assert:
that: out.rc == 4 # unreachable that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen when: is_mitogen

@ -3,7 +3,6 @@
- name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) - name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: mitogen_linear strategy: mitogen_linear
run_once: true run_once: true
tasks: tasks:
@ -22,7 +21,6 @@
- name: integration/strategy/_mixed_mitogen_vanilla.yml (linear) - name: integration/strategy/_mixed_mitogen_vanilla.yml (linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: linear strategy: linear
tasks: tasks:
- custom_python_detect_environment: - custom_python_detect_environment:
@ -40,7 +38,6 @@
- name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) - name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: mitogen_linear strategy: mitogen_linear
tasks: tasks:
- custom_python_detect_environment: - custom_python_detect_environment:

@ -3,7 +3,6 @@
- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) - name: integration/strategy/_mixed_vanilla_mitogen.yml (linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: linear strategy: linear
tasks: tasks:
- custom_python_detect_environment: - custom_python_detect_environment:
@ -21,7 +20,6 @@
- name: integration/strategy/_mixed_vanilla_mitogen.yml (mitogen_linear) - name: integration/strategy/_mixed_vanilla_mitogen.yml (mitogen_linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: mitogen_linear strategy: mitogen_linear
tasks: tasks:
- custom_python_detect_environment: - custom_python_detect_environment:
@ -39,7 +37,6 @@
- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) - name: integration/strategy/_mixed_vanilla_mitogen.yml (linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
strategy: linear strategy: linear
tasks: tasks:
- custom_python_detect_environment: - custom_python_detect_environment:

@ -1,7 +1,6 @@
- name: integration/strategy/mixed_vanilla_mitogen.yml (linear->mitogen->linear) - name: integration/strategy/mixed_vanilla_mitogen.yml (linear->mitogen->linear)
hosts: test-targets[0] hosts: test-targets[0]
any_errors_fatal: true
tasks: tasks:
- connection: local - connection: local
command: | command: |

@ -2,7 +2,6 @@
- name: integration/stub_connections/kubectl.yml - name: integration/stub_connections/kubectl.yml
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,6 @@
- name: integration/stub_connections/lxc.yml - name: integration/stub_connections/lxc.yml
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,6 @@
- name: integration/stub_connections/lxd.yml - name: integration/stub_connections/lxd.yml
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,6 @@
- name: integration/stub_connections/mitogen_doas.yml - name: integration/stub_connections/mitogen_doas.yml
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -2,7 +2,6 @@
- name: integration/stub_connections/mitogen_sudo.yml - name: integration/stub_connections/mitogen_sudo.yml
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
any_errors_fatal: true
tasks: tasks:
- meta: end_play - meta: end_play
when: not is_mitogen when: not is_mitogen

@ -41,7 +41,7 @@
- out.result[0].kwargs.port == 4321 - out.result[0].kwargs.port == 4321
fail_msg: out={{out}} fail_msg: out={{out}}
- hosts: tc-port-explicit-unset - hosts: tc-port-unset
vars: {mitogen_via: tc-port-explicit-ssh} vars: {mitogen_via: tc-port-explicit-ssh}
tasks: tasks:
- include: ../_mitogen_only.yml - include: ../_mitogen_only.yml
@ -50,9 +50,9 @@
that: that:
- out.result|length == 2 - out.result|length == 2
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[1].kwargs.port == 4321 - out.result[0].kwargs.port == 4321
- out.result[1].method == "ssh" - out.result[1].method == "ssh"
- out.result[0].kwargs.port == None - out.result[1].kwargs.port == None
fail_msg: out={{out}} fail_msg: out={{out}}
# ansible_port= # ansible_port=

@ -60,7 +60,7 @@
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
right: "ansi-user" right: "ansi-user"
- hosts: tc-remote-user-explicit-host - hosts: tc-remote-user-explicit-user
vars: {mitogen_via: tc-remote-user-unset} vars: {mitogen_via: tc-remote-user-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include: ../_mitogen_only.yml

@ -3,7 +3,6 @@
- name: regression/issue_109__target_has_old_ansible_installed.yml - name: regression/issue_109__target_has_old_ansible_installed.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
gather_facts: true gather_facts: true
tasks: tasks:
- meta: end_play - meta: end_play

@ -2,7 +2,6 @@
# by exercisizng the uri package. # by exercisizng the uri package.
- name: regression/issue_113__duplicate_module_imports.yml - name: regression/issue_113__duplicate_module_imports.yml
any_errors_fatal: true
hosts: test-targets hosts: test-targets
tasks: tasks:

@ -4,7 +4,6 @@
- name: regression/issue_140__thread_pileup.yml - name: regression/issue_140__thread_pileup.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true
tasks: tasks:
- name: Create file tree - name: Create file tree

@ -6,7 +6,6 @@
- name: regression/issue_152__local_action_wrong_interpreter.yml - name: regression/issue_152__local_action_wrong_interpreter.yml
hosts: test-targets hosts: test-targets
connection: local connection: local
any_errors_fatal: true
tasks: tasks:
- copy: - copy:

@ -1,5 +1,4 @@
- name: regression/issue_152__virtualenv_python_fails.yml - name: regression/issue_152__virtualenv_python_fails.yml
any_errors_fatal: true
gather_facts: true gather_facts: true
hosts: test-targets hosts: test-targets
tasks: tasks:

@ -2,7 +2,6 @@
# must be reinitialized or cleared out somehow on each invocation. # must be reinitialized or cleared out somehow on each invocation.
- name: regression/issue_154__module_state_leaks.yml - name: regression/issue_154__module_state_leaks.yml
any_errors_fatal: true
hosts: test-targets hosts: test-targets
tasks: tasks:

@ -1,5 +1,4 @@
- name: regression/issue_177__copy_module_failing.yml - name: regression/issue_177__copy_module_failing.yml
any_errors_fatal: true
hosts: test-targets hosts: test-targets
tasks: tasks:

@ -2,7 +2,6 @@
- name: regression/issue_615_streaming_transfer.yml - name: regression/issue_615_streaming_transfer.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: True
gather_facts: no gather_facts: no
# Without Mitogen this causes Ansible to use the slurp module, which is *slow* # Without Mitogen this causes Ansible to use the slurp module, which is *slow*
become: true become: true

@ -4,10 +4,8 @@
# since things are ran on localhost; Azure DevOps loses connection and fails # since things are ran on localhost; Azure DevOps loses connection and fails
# TODO: do we want to install docker a different way to be able to do this for other tests too # TODO: do we want to install docker a different way to be able to do this for other tests too
--- ---
# this should only run on our Mac hosts
- name: regression/issue_655_wait_for_connection_error.yml - name: regression/issue_655_wait_for_connection_error.yml
hosts: targets hosts: localhost
any_errors_fatal: True
gather_facts: yes gather_facts: yes
become: no become: no
tasks: tasks:
@ -85,5 +83,7 @@
loop: loop:
- cmd: podman stop testMitogen - cmd: podman stop testMitogen
- cmd: podman machine stop - cmd: podman machine stop
when:
- ansible_facts.pkg_mgr in ['homebrew']
tags: tags:
- issue_655 - issue_655

@ -17,3 +17,4 @@
- debug: {var: ansible_run_tags} - debug: {var: ansible_run_tags}
- debug: {var: ansible_skip_tags} - debug: {var: ansible_skip_tags}
- debug: {var: ansible_version.full} - debug: {var: ansible_version.full}
- debug: {var: is_mitogen}

@ -205,7 +205,7 @@ class LinuxPolicyTest(testlib.TestCase):
proc.wait() proc.wait()
his_cpu = self._get_cpus(tf.name) his_cpu = self._get_cpus(tf.name)
self.assertNotEquals(my_cpu, his_cpu) self.assertNotEqual(my_cpu, his_cpu)
self.policy._clear() self.policy._clear()
finally: finally:
tf.close() tf.close()

@ -86,6 +86,7 @@ passenv =
AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY
HOME HOME
setenv = setenv =
# See also azure-pipelines.yml
ANSIBLE_SKIP_TAGS = requires_local_sudo,resource_intensive ANSIBLE_SKIP_TAGS = requires_local_sudo,resource_intensive
ANSIBLE_STRATEGY = mitogen_linear ANSIBLE_STRATEGY = mitogen_linear
NOCOVERAGE_ERASE = 1 NOCOVERAGE_ERASE = 1

Loading…
Cancel
Save