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

Extend coverage of prepare/finish ansible plugin with more images #3110

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

happz
Copy link
Collaborator

@happz happz commented Jul 24, 2024

The coverage now matches what prepare/install is tested with. This change required refactoring of some bits of prepare/install test:

  • moving generic helpers into tests/install.sh,
  • changing tests for ansible plugin to use tests/images.sh instead of its original one-shot use of images.

This gives us:

  • the same coverage for both plugins,
  • one place where new environment needs to be added,
  • less code duplication, more re-use of "image testing" helpers,
  • and, the best, it actually discovers a genuine bug: ansible plugins did not report Python interpreter as their essential requirement, therefore playbooks were impossible to run in some environments.

Pull Request Checklist

  • implement the feature
  • extend the test coverage

@happz happz added step | prepare Stuff related to the prepare step command | tests tmt tests command step | finish Stuff related to the finish step plugin | ansible The ansible plugins labels Jul 24, 2024
@happz happz added this to the 1.35 milestone Jul 24, 2024
Copy link
Collaborator

@thrix thrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no comments from me

@happz happz added status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. ci | full test Pull request is ready for the full test execution labels Jul 30, 2024
@happz happz force-pushed the ansible-test-container-and-virtual branch 4 times, most recently from 91d0368 to 6a9f992 Compare July 31, 2024 10:52
The coverage now matches what `prepare/install` is tested with. This
change required refactoring of some bits of `prepare/install` test:

* moving generic helpers into `tests/install.sh`,
* changing tests for `ansible` plugin to use `tests/images.sh` instead
of its original one-shot use of images.

This gives us:

* the same coverage for both plugins,
* one place where new environment needs to be added,
* less code duplication, more re-use of "image testing" helpers,
* and, the best, it actually discovers a genuine bug: `ansible` plugins
  did not report Python interpreter as their essential requirement,
  therefore playbooks were impossible to run in some environments.
@happz happz force-pushed the ansible-test-container-and-virtual branch from 375d1c7 to b3221aa Compare August 2, 2024 11:02
@happz
Copy link
Collaborator Author

happz commented Aug 2, 2024

Unrelated failures, merging.

@happz happz merged commit 2a0c3b1 into main Aug 2, 2024
19 of 20 checks passed
@happz happz deleted the ansible-test-container-and-virtual branch August 2, 2024 12:26
The-Mule pushed a commit to The-Mule/tmt that referenced this pull request Oct 14, 2024
…emtee#3110)

The coverage now matches what `prepare/install` is tested with. This
change required refactoring of some bits of `prepare/install` test:

* moving generic helpers into `tests/install.sh`,
* changing tests for `ansible` plugin to use `tests/images.sh` instead
of its original one-shot use of images.

This gives us:

* the same coverage for both plugins,
* one place where new environment needs to be added,
* less code duplication, more re-use of "image testing" helpers,
* and, the best, it actually discovers a genuine bug: `ansible` plugins
  did not report Python interpreter as their essential requirement,
  therefore playbooks were impossible to run in some environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution command | tests tmt tests command plugin | ansible The ansible plugins status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. step | finish Stuff related to the finish step step | prepare Stuff related to the prepare step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants