-
Notifications
You must be signed in to change notification settings - Fork 271
Tests: Handle SELinux in proxy provider tests #8348
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a helper to temporarily disable SELinux for tests that require it. The implementation is sound, but can be improved for better maintainability and integration with pytest. I've suggested converting the new context manager into a pytest fixture. This will reduce code duplication across the test suite and make the tests cleaner. This also makes the newly added contextlib import unnecessary.
jakub-vavra-cz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks nice and clean.
I suggest adding this to the framework with "host" instead of "client" so it can be more easily reused elsewhere.
02c9abd to
c5d2c2a
Compare
|
c5d2c2a to
dfdbd1f
Compare
|
I will create a new ticket to rewrite the tests to not use nss-pam-ldapd but some other nss and pam modules. |
jakub-vavra-cz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
jakub-vavra-cz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The framework change SSSD/sssd-test-framework#227 needed is already merged just this ci did not register it.
Tests using nslcd fail under SELinux enforcing due to missing policies for test-only nss-pam-ldapd configuration. Add context manager to temporarily set permissive mode for affected tests. Reviewed-by: Jakub Vávra <jvavra@redhat.com>
Tests using nslcd fail under SELinux enforcing due to missing policies for test-only nss-pam-ldapd configuration. Add context manager to temporarily set permissive mode for affected tests.