Tests: Handle SELinux in proxy provider tests#8348
Conversation
There was a problem hiding this comment.
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.
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.
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 <[email protected]>
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.