Skip to content

Commit

Permalink
Merge pull request mitogen-hq#1227 from moreati/rename-tc-via-tests
Browse files Browse the repository at this point in the history
tests: Name transport_config tests that involve mitogen_via
  • Loading branch information
moreati authored Jan 27, 2025
2 parents fca7578 + f82c72f commit 45472c6
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 39 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions tests/ansible/integration/transport_config/become.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions tests/ansible/integration/transport_config/become_method.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions tests/ansible/integration/transport_config/become_pass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/ansible/integration/transport_config/become_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 8 additions & 4 deletions tests/ansible/integration/transport_config/password.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions tests/ansible/integration/transport_config/port.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions tests/ansible/integration/transport_config/python_path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions tests/ansible/integration/transport_config/remote_addr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions tests/ansible/integration/transport_config/remote_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/ansible/integration/transport_config/transport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 45472c6

Please sign in to comment.