Skip to content

ci: Consolidate Mitogen jobs#1159

Merged
moreati merged 2 commits intomitogen-hq:masterfrom
moreati:test-distro-specs
Oct 10, 2024
Merged

ci: Consolidate Mitogen jobs#1159
moreati merged 2 commits intomitogen-hq:masterfrom
moreati:test-distro-specs

Conversation

@moreati
Copy link
Member

@moreati moreati commented Oct 10, 2024

This reduces the number of jobs from 48 to 24. The Mitogen part of the test suite has been parameterized on the Linux container targets to be run against. Both the Ansible tests & Mitogen tests now use the same source of truth to control which targets to use: environment variable MITOGEN_TEST_DISTRO_SPECS. This replaces the two mutually exclusive env vars DISTRO and DISTROS. I've also removed vestgial traces of an unused env var MITOGEN_TEST_DISTRO.

Parameterization adapted from https://eli.thegreenplace.net/2014/04/02/dynamically-generating-python-test-cases

refs #1058, #1059

This reduces the number of jobs from 48 to 24. The Mitogen part of the test
suite has been parameterized on the Linux container targets to be run against.
Both the Ansible tests & Mitogen tests now use the same source of truth to
control which targets to use: environment variable MITOGEN_TEST_DISTRO_SPECS.
This replaces the two mutually exclusive env vars DISTRO and DISTROS. I've
also removed vestgial traces of an unused env var MITOGEN_TEST_DISTRO.

Parameterization adapted from
https://eli.thegreenplace.net/2014/04/02/dynamically-generating-python-test-cases

refs mitogen-hq#1058, mitogen-hq#1059
@moreati
Copy link
Member Author

moreati commented Oct 10, 2024

Before

...
test_okay (ssh_test.ConstructorTest) ... ok
test_accept_enforce_host_keys (ssh_test.SshTest) ... ok
test_bash_permission_denied (ssh_test.SshTest) ... ok
test_debug_decoding (ssh_test.SshTest) ... ok
test_enforce_unknown_host_key (ssh_test.SshTest) ... ok
test_password_incorrect (ssh_test.SshTest) ... ok
test_password_required (ssh_test.SshTest) ... ok
test_password_specified (ssh_test.SshTest) ... ok
test_pubkey_required (ssh_test.SshTest) ... ok
test_pubkey_specified (ssh_test.SshTest) ... ok
test_stream_name (ssh_test.SshTest) ... ok
test_via_stream_name (ssh_test.SshTest) ... ok
test_check_host_keys_accept (ssh_test.StubCheckHostKeysTest) ... ok
...

After

...
test_stream_name (ssh_test.SshTestCentos6) ... ok
test_via_stream_name (ssh_test.SshTestCentos6) ... ok
test_accept_enforce_host_keys (ssh_test.SshTestCentos8) ... ok
test_bash_permission_denied (ssh_test.SshTestCentos8) ... ok
test_debug_decoding (ssh_test.SshTestCentos8) ... ok
test_enforce_unknown_host_key (ssh_test.SshTestCentos8) ... ok
test_password_incorrect (ssh_test.SshTestCentos8) ... ok
test_password_required (ssh_test.SshTestCentos8) ... ok
test_password_specified (ssh_test.SshTestCentos8) ... ok
test_pubkey_required (ssh_test.SshTestCentos8) ... ok
test_pubkey_specified (ssh_test.SshTestCentos8) ... ok
test_stream_name (ssh_test.SshTestCentos8) ... ok
test_via_stream_name (ssh_test.SshTestCentos8) ... ok
test_accept_enforce_host_keys (ssh_test.SshTestDebian11) ... ok
test_bash_permission_denied (ssh_test.SshTestDebian11) ... ok
...

@moreati moreati marked this pull request as ready for review October 10, 2024 17:48
@moreati moreati merged commit f384fc3 into mitogen-hq:master Oct 10, 2024
@moreati moreati deleted the test-distro-specs branch October 10, 2024 17:54
moreati added a commit to mordekasg/mitogen that referenced this pull request Oct 14, 2024
This reads the become username from the `become_user` attribute of the play
context, to the `"become_user"` option of the loaded become plugin. This has
been supported by vanilla Ansible since Ansible 2.10 (ansible-base 2.10).

To support this I've also switched from using the `play_context.become` (a
bool), to `connection.become` (an instance of the appropriate) become plugin.

New tests have been added, modelled on those for templated connection
parameters (see mitogen-hq#1147, mitogen-hq#1153, mitogen-hq#1159).

See
- ansible/ansible@480b106

refs mitogen-hq#1083

Co-authored-by: mordek <m.pirog@bonasoft.pl>
jadacyrus pushed a commit to jadacyrus/mitogen that referenced this pull request Jan 28, 2025
This reads the become username from the `become_user` attribute of the play
context, to the `"become_user"` option of the loaded become plugin. This has
been supported by vanilla Ansible since Ansible 2.10 (ansible-base 2.10).

To support this I've also switched from using the `play_context.become` (a
bool), to `connection.become` (an instance of the appropriate) become plugin.

New tests have been added, modelled on those for templated connection
parameters (see mitogen-hq#1147, mitogen-hq#1153, mitogen-hq#1159).

See
- ansible/ansible@480b106

refs mitogen-hq#1083

Co-authored-by: mordek <m.pirog@bonasoft.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant