From f82c72f539f8b0dcd5f6a07af8733833a749830d Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 24 Jan 2025 12:56:02 +0000 Subject: [PATCH] tests: Name transport_config tests that involve mitogen_via This should make it much easier to find a (failed) test, based on test output. --- docs/changelog.rst | 1 + .../integration/transport_config/become.yml | 6 ++++-- .../transport_config/become_method.yml | 10 ++++++---- .../integration/transport_config/become_pass.yml | 9 ++++++--- .../integration/transport_config/become_user.yml | 6 ++++-- .../transport_config/host_key_checking.yml | 9 ++++++--- .../integration/transport_config/password.yml | 12 ++++++++---- .../ansible/integration/transport_config/port.yml | 12 ++++++++---- .../integration/transport_config/python_path.yml | 15 ++++++++++----- .../integration/transport_config/remote_addr.yml | 12 ++++++++---- .../integration/transport_config/remote_user.yml | 12 ++++++++---- .../integration/transport_config/transport.yml | 6 ++++-- .../transport_config/transport__smart.yml | 6 ++++-- 13 files changed, 77 insertions(+), 39 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ef575c35..16f082f7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -34,6 +34,7 @@ In progress (unreleased) error handling * :gh:issue:`1213` :mod:`ansible_mitogen`: Return ``stderr_lines`` from ``_low_level_execute_command()`` +* :gh:issue:`1227` tests: Name transport_config tests that use ``mitogen_via`` v0.3.21 (2025-01-20) diff --git a/tests/ansible/integration/transport_config/become.yml b/tests/ansible/integration/transport_config/become.yml index 968d5e51..2f4fe37f 100644 --- a/tests/ansible/integration/transport_config/become.yml +++ b/tests/ansible/integration/transport_config/become.yml @@ -17,7 +17,8 @@ tags: - mitogen_only -- hosts: tc-become-unset +- name: tc-become-unset via becomeuser@tc-become-set + hosts: tc-become-unset vars: {mitogen_via: becomeuser@tc-become-set} tasks: - include_tasks: ../_mitogen_only.yml @@ -59,7 +60,8 @@ tags: - mitogen_only -- hosts: tc-become-set +- name: tc-become-set via tc-become-unset + hosts: tc-become-set vars: {mitogen_via: tc-become-unset} become: true become_user: becomeuser diff --git a/tests/ansible/integration/transport_config/become_method.yml b/tests/ansible/integration/transport_config/become_method.yml index d6250314..0c2968eb 100644 --- a/tests/ansible/integration/transport_config/become_method.yml +++ b/tests/ansible/integration/transport_config/become_method.yml @@ -18,7 +18,8 @@ tags: - mitogen_only -- hosts: tc-become-method-unset +- name: tc-become-method-unset via becomeuser@tc-become-method-su + hosts: tc-become-method-unset vars: {mitogen_via: becomeuser@tc-become-method-su} tasks: - include_tasks: ../_mitogen_only.yml @@ -55,7 +56,8 @@ tags: - mitogen_only -- hosts: tc-become-method-su +- name: tc-become-method-su via tc-become-method-unset + hosts: tc-become-method-su vars: {mitogen_via: tc-become-method-unset} become: true become_user: becomeuser @@ -79,9 +81,9 @@ - mitogen_only - # mitogen_via used to specify explicit become method -- hosts: tc-become-method-unset +- name: tc-become-method-unset via doas:doasuser@tc-become-method-su + hosts: tc-become-method-unset vars: {mitogen_via: "doas:doasuser@tc-become-method-su"} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/become_pass.yml b/tests/ansible/integration/transport_config/become_pass.yml index c6b0fe72..d9a0bb55 100644 --- a/tests/ansible/integration/transport_config/become_pass.yml +++ b/tests/ansible/integration/transport_config/become_pass.yml @@ -79,7 +79,8 @@ # ansible_become_password=, via= -- hosts: tc-become-pass-password +- name: tc-become-pass-password via root@tc-become-pass-pass + hosts: tc-become-pass-password vars: {mitogen_via: root@tc-become-pass-pass} become: true tasks: @@ -119,7 +120,8 @@ # ansible_become_pass=, via= -- hosts: tc-become-pass-pass +- name: tc-become-pass-pass via root@tc-become-pass-password + hosts: tc-become-pass-pass vars: {mitogen_via: root@tc-become-pass-password} become: true tasks: @@ -161,7 +163,8 @@ # both, mitogen_via -- hosts: tc-become-pass-unset +- name: tc-become-pass-unset via root@tc-become-pass-both + hosts: tc-become-pass-unset vars: {mitogen_via: root@tc-become-pass-both} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/become_user.yml b/tests/ansible/integration/transport_config/become_user.yml index 59dbe2a9..11c8abf8 100644 --- a/tests/ansible/integration/transport_config/become_user.yml +++ b/tests/ansible/integration/transport_config/become_user.yml @@ -79,7 +79,8 @@ # ansible_become_user=, unbecoming via= -- hosts: tc-become-user-set +- name: tc-become-user-set via tc-become-user-unset + hosts: tc-become-user-set vars: {mitogen_via: tc-become-user-unset} become: true tasks: @@ -103,7 +104,8 @@ # ansible_become_user=, becoming via= -- hosts: tc-become-user-set +- name: tc-become-user-set via doas:doasuser@tc-become-user-unset + hosts: tc-become-user-set vars: {mitogen_via: "doas:doasuser@tc-become-user-unset"} become: true tasks: diff --git a/tests/ansible/integration/transport_config/host_key_checking.yml b/tests/ansible/integration/transport_config/host_key_checking.yml index 5f9c7e3a..d058531f 100644 --- a/tests/ansible/integration/transport_config/host_key_checking.yml +++ b/tests/ansible/integration/transport_config/host_key_checking.yml @@ -15,7 +15,8 @@ tags: - mitogen_only -- hosts: tc-hkc-unset +- name: tc-hkc-unset via tc-hkc-host-key-checking + hosts: tc-hkc-unset vars: mitogen_via: tc-hkc-host-key-checking tasks: @@ -48,7 +49,8 @@ tags: - mitogen_only -- hosts: tc-hkc-host-key-checking +- name: tc-hkc-host-key-checking via tc-hkc-unset + hosts: tc-hkc-host-key-checking vars: mitogen_via: tc-hkc-unset tasks: @@ -81,7 +83,8 @@ tags: - mitogen_only -- hosts: tc-hkc-ssh-host-key-checking +- name: tc-hkc-ssh-host-key-checking via tc-hkc-unset + hosts: tc-hkc-ssh-host-key-checking vars: mitogen_via: tc-hkc-unset tasks: diff --git a/tests/ansible/integration/transport_config/password.yml b/tests/ansible/integration/transport_config/password.yml index c55939f7..5a1968e0 100644 --- a/tests/ansible/integration/transport_config/password.yml +++ b/tests/ansible/integration/transport_config/password.yml @@ -14,7 +14,8 @@ tags: - mitogen_only -- hosts: tc-password-unset +- name: tc-password-unset via tc-password-explicit-ssh + hosts: tc-password-unset vars: {mitogen_via: tc-password-explicit-ssh} tasks: - include_tasks: ../_mitogen_only.yml @@ -41,7 +42,8 @@ tags: - mitogen_only -- hosts: tc-password-explicit-ssh +- name: tc-password-explicit-ssh via tc-password-unset + hosts: tc-password-explicit-ssh vars: {mitogen_via: tc-password-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -68,7 +70,8 @@ tags: - mitogen_only -- hosts: tc-password-explicit-pass +- name: tc-password-explicit-pass via tc-password-unset + hosts: tc-password-explicit-pass vars: {mitogen_via: tc-password-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -95,7 +98,8 @@ tags: - mitogen_only -- hosts: tc-password-explicit-both +- name: tc-password-explicit-both via tc-password-unset + hosts: tc-password-explicit-both vars: {mitogen_via: tc-password-unset} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/port.yml b/tests/ansible/integration/transport_config/port.yml index abc68058..6779f699 100644 --- a/tests/ansible/integration/transport_config/port.yml +++ b/tests/ansible/integration/transport_config/port.yml @@ -20,7 +20,8 @@ - mitogen_only # Not set, mitogen_via= -- hosts: tc-port-explicit-ssh +- name: tc-port-explicit-ssh via tc-port-unset + hosts: tc-port-explicit-ssh vars: {mitogen_via: tc-port-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -52,7 +53,8 @@ tags: - mitogen_only -- hosts: tc-port-unset +- name: tc-port-unset via tc-port-explicit-ssh + hosts: tc-port-unset vars: {mitogen_via: tc-port-explicit-ssh} tasks: - include_tasks: ../_mitogen_only.yml @@ -86,7 +88,8 @@ tags: - mitogen_only -- hosts: tc-port-unset +- name: tc-port-unset via tc-port-explicit-port + hosts: tc-port-unset vars: {mitogen_via: tc-port-explicit-port} tasks: - include_tasks: ../_mitogen_only.yml @@ -121,7 +124,8 @@ tags: - mitogen_only -- hosts: tc-port-unset +- name: tc-port-unset via tc-port-both + hosts: tc-port-unset vars: {mitogen_via: tc-port-both} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/python_path.yml b/tests/ansible/integration/transport_config/python_path.yml index ecc24374..21f3928c 100644 --- a/tests/ansible/integration/transport_config/python_path.yml +++ b/tests/ansible/integration/transport_config/python_path.yml @@ -20,7 +20,8 @@ tags: - mitogen_only -- hosts: tc-python-path-hostvar +- name: tc-python-path-hostvar via tc-python-path-unset + hosts: tc-python-path-hostvar vars: {mitogen_via: tc-python-path-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -49,7 +50,8 @@ tags: - mitogen_only -- hosts: tc-python-path-unset +- name: tc-python-path-unset via tc-python-path-hostvar + hosts: tc-python-path-unset vars: {mitogen_via: tc-python-path-hostvar} tasks: - include_tasks: ../_mitogen_only.yml @@ -78,7 +80,8 @@ tags: - mitogen_only -- hosts: tc-python-path-unset +- name: tc-python-path-unset via localhost + hosts: tc-python-path-unset vars: {mitogen_via: localhost} tasks: - include_tasks: ../_mitogen_only.yml @@ -108,7 +111,8 @@ - mitogen_only -- hosts: localhost +- name: localhost via tc-python-path-local-unset + hosts: localhost vars: {mitogen_via: tc-python-path-local-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -134,7 +138,8 @@ tags: - mitogen_only -- hosts: localhost +- name: localhost via tc-python-path-local-explicit + hosts: localhost vars: {mitogen_via: tc-python-path-local-explicit} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/remote_addr.yml b/tests/ansible/integration/transport_config/remote_addr.yml index b1a6c5a7..9f7ff5f6 100644 --- a/tests/ansible/integration/transport_config/remote_addr.yml +++ b/tests/ansible/integration/transport_config/remote_addr.yml @@ -15,7 +15,8 @@ tags: - mitogen_only -- hosts: tc-remote-addr-unset +- name: tc-remote-addr-unset via tc-remote-addr-explicit-ssh + hosts: tc-remote-addr-unset vars: {mitogen_via: tc-remote-addr-explicit-ssh} tasks: - include_tasks: ../_mitogen_only.yml @@ -42,7 +43,8 @@ tags: - mitogen_only -- hosts: tc-remote-addr-explicit-ssh +- name: tc-remote-addr-explicit-ssh via tc-remote-addr-unset + hosts: tc-remote-addr-explicit-ssh vars: {mitogen_via: tc-remote-addr-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -69,7 +71,8 @@ tags: - mitogen_only -- hosts: tc-remote-addr-explicit-host +- name: tc-remote-addr-explicit-host via tc-remote-addr-unset + hosts: tc-remote-addr-explicit-host vars: {mitogen_via: tc-remote-addr-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -96,7 +99,8 @@ tags: - mitogen_only -- hosts: tc-remote-addr-explicit-both +- name: tc-remote-addr-explicit-both via tc-remote-addr-unset + hosts: tc-remote-addr-explicit-both vars: {mitogen_via: tc-remote-addr-unset} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/remote_user.yml b/tests/ansible/integration/transport_config/remote_user.yml index a5559edb..94fcf485 100644 --- a/tests/ansible/integration/transport_config/remote_user.yml +++ b/tests/ansible/integration/transport_config/remote_user.yml @@ -16,7 +16,8 @@ tags: - mitogen_only -- hosts: tc-remote-user-unset +- name: tc-remote-user-unset via tc-remote-user-explicit-ssh + hosts: tc-remote-user-unset vars: {mitogen_via: tc-remote-user-explicit-ssh} tasks: - include_tasks: ../_mitogen_only.yml @@ -43,7 +44,8 @@ tags: - mitogen_only -- hosts: tc-remote-user-explicit-ssh +- name: tc-remote-user-explicit-ssh via tc-remote-user-unset + hosts: tc-remote-user-explicit-ssh vars: {mitogen_via: tc-remote-user-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -68,7 +70,8 @@ left: out.result[0].kwargs.username right: "ansi-user" -- hosts: tc-remote-user-explicit-user +- name: tc-remote-user-explicit-user via tc-remote-user-unset + hosts: tc-remote-user-explicit-user vars: {mitogen_via: tc-remote-user-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -95,7 +98,8 @@ tags: - mitogen_only -- hosts: tc-remote-user-explicit-both +- name: tc-remote-user-explicit-both via tc-remote-user-unset + hosts: tc-remote-user-explicit-both vars: {mitogen_via: tc-remote-user-unset} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/transport.yml b/tests/ansible/integration/transport_config/transport.yml index 1bac788b..0b0568e8 100644 --- a/tests/ansible/integration/transport_config/transport.yml +++ b/tests/ansible/integration/transport_config/transport.yml @@ -14,7 +14,8 @@ tags: - mitogen_only -- hosts: tc-transport-local +- name: tc-transport-local via tc-transport-unset + hosts: tc-transport-local vars: {mitogen_via: tc-transport-unset} tasks: - include_tasks: ../_mitogen_only.yml @@ -41,7 +42,8 @@ tags: - mitogen_only -- hosts: tc-transport-unset +- name: tc-transport-unset via tc-transport-local + hosts: tc-transport-unset vars: {mitogen_via: tc-transport-local} tasks: - include_tasks: ../_mitogen_only.yml diff --git a/tests/ansible/integration/transport_config/transport__smart.yml b/tests/ansible/integration/transport_config/transport__smart.yml index d2adca45..2ed513af 100644 --- a/tests/ansible/integration/transport_config/transport__smart.yml +++ b/tests/ansible/integration/transport_config/transport__smart.yml @@ -15,7 +15,8 @@ tags: - mitogen_only -- hosts: tc-transport-local +- name: tc-transport-local via tc-transport-smart + hosts: tc-transport-local vars: {mitogen_via: tc-transport-smart} tasks: - include_tasks: ../_mitogen_only.yml @@ -42,7 +43,8 @@ tags: - mitogen_only -- hosts: tc-transport-smart +- name: tc-transport-smart via tc-transport-local + hosts: tc-transport-smart vars: {mitogen_via: tc-transport-local} tasks: - include_tasks: ../_mitogen_only.yml