Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Consolidate Mitogen jobs #1159

Merged
merged 2 commits into from
Oct 10, 2024
Merged

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
24 checks passed
@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>
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