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: Add tests::uses_selinux tag #338

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

nhosoi
Copy link
Contributor

@nhosoi nhosoi commented Jun 26, 2023

Enhancement:
Set tests::uses_selinux tag to the test playbook that uses the
selinux role, one of the selinux modules or commands internally.

Reason:
We are improving tox-lsr runcontainer.sh that runs CI tests using a container. (See also https://github.com/richm/tox-lsr/tree/container-improvements.) In the effort, we need a mechanism to skip a test that depends on SELinux since SELinux is disabled in a container, by default.

Result:
This is a sample command line to run all the runnable CI tests using runcontainer.sh in tox-lsr.

tox -e container-ansible-core-2.15 -- --erase-old-snapshot --extra-rpm diffutils \
--extra-skip-tag "tests::uses_selinux" --parallel 4 \
--image-name centos-9 tests/tests_*.yml

As shown in the command line, by passing --extra-skip-tag tests::uses_selinux, the tests tests_basics_files.yml, tests_ovirt_elasticsearch.yml, and tests_relp.yml will be skipped and the series of the tests pass.

Set `tests::uses_selinux` tag to the test playbook that uses the
selinux role, one of the selinux modules or commands internally.

Signed-off-by: Noriko Hosoi <[email protected]>
@nhosoi nhosoi changed the title ci: Add tests::use_selinux_role tag ci: Add tests::uses_selinux tag Jun 28, 2023
@richm richm merged commit 087e67b into linux-system-roles:main Jun 28, 2023
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.

2 participants