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

Split out module/module_utils unit test execution. #74337

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

mattclay
Copy link
Member

SUMMARY

Split out module/module_utils unit test execution.

  • Unit tests for modules and module_utils are now limited to importing only ansible.module_utils from the ansible module.
  • Unit tests other than modules and module_utils are now run only on Python versions supported by the controller (Python 3.8+).
  • Unit tests are now run in separate contexts (controller, modules, module_utils), each using separate invocations of pytest.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ansible-test

ADDITIONAL INFORMATION

This removes unit tests as a barrier to completely dropping support for Python 3.7 and earlier on the controller.

- Unit tests for `modules` and `module_utils` are now limited to importing only `ansible.module_utils` from the `ansible` module.
- Unit tests other than `modules` and `module_utils` are now run only on Python versions supported by the controller (Python 3.8+).
- Unit tests are now run in separate contexts (`controller`, `modules`, `module_utils`), each using separate invocations of `pytest`.
@ansibot ansibot added affects_2.12 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Apr 19, 2021
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label Apr 19, 2021
@mattclay mattclay merged commit 7786dbb into ansible:devel Apr 19, 2021
@mattclay mattclay deleted the at-split-unit-tests branch April 19, 2021 22:45
@ansible ansible locked and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.12 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants