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

[PR #9672/7a6125b9 backport][stable-10] test helper: improvements #9673

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Feb 2, 2025

This is a backport of PR #9672 as merged into main (7a6125b).

changes:

  • methods from_module(), from_file() and from_spec() now all have a similar order of parameters
  • from_module() tries extensions .yaml and .yml before giving up
  • remove redundant parameter test_spec from from_module()
  • from_file() now receives an open, readable, file handle instead of a filename
  • Helper no longer accepts a test specification that is a top-level list of testcases, it must be a dict containing the key test_cases, which will be the list.
  • test_snap.py adjusted for the change in from_spec()
SUMMARY
ISSUE TYPE
  • Test Pull Request
COMPONENT NAME

tests/unit/plugins/modules/helper.py
tests/unit/plugins/modules/test_snap.py

(cherry picked from commit 7a6125b)
@patchback patchback bot mentioned this pull request Feb 2, 2025
@ansibullbot ansibullbot added backport new_contributor Help guide this first time contributor tests tests unit tests/unit labels Feb 2, 2025
@felixfontein felixfontein merged commit f545c30 into stable-10 Feb 2, 2025
138 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-10/7a6125b99a000dbbd572514bc796da6bb3973af9/pr-9672 branch February 2, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport new_contributor Help guide this first time contributor tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants