[PR #8894/8ef77d86 backport][stable-9] unit test helper: big revamp #8943
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #8894 as merged into main (8ef77d8).
SUMMARY
Revamped the test helper to be able to support more than just
run_command()
. This PR makes the code more generic and expansible, allowing for easier tests in the future.ISSUE TYPE
COMPONENT NAME
tests/unit/plugins/modules/conftest.py
tests/unit/plugins/modules/helper.py
tests/unit/plugins/modules/test_cpanm.py
tests/unit/plugins/modules/test_cpanm.yaml
tests/unit/plugins/modules/test_django_check.py
tests/unit/plugins/modules/test_django_check.yaml
tests/unit/plugins/modules/test_django_check.yaml.license
tests/unit/plugins/modules/test_django_command.py
tests/unit/plugins/modules/test_django_command.yaml
tests/unit/plugins/modules/test_django_createcachetable.py
tests/unit/plugins/modules/test_django_createcachetable.yaml
tests/unit/plugins/modules/test_facter_facts.py
tests/unit/plugins/modules/test_facter_facts.yaml
tests/unit/plugins/modules/test_gconftool2.py
tests/unit/plugins/modules/test_gconftool2.yaml
tests/unit/plugins/modules/test_gconftool2_info.py
tests/unit/plugins/modules/test_gconftool2_info.yaml
tests/unit/plugins/modules/test_gio_mime.py
tests/unit/plugins/modules/test_gio_mime.yaml
tests/unit/plugins/modules/test_opkg.py
tests/unit/plugins/modules/test_opkg.yaml
tests/unit/plugins/modules/test_puppet.py
tests/unit/plugins/modules/test_puppet.yaml
tests/unit/plugins/modules/test_snap.py
tests/unit/plugins/modules/test_xfconf.py
tests/unit/plugins/modules/test_xfconf.yaml
tests/unit/plugins/modules/test_xfconf_info.py
tests/unit/plugins/modules/test_xfconf_info.yaml