tests: port LDAP+Kerberos tests to pytest#8544
Conversation
madhuriupadhye
commented
Mar 23, 2026
- Port three downstream krb_misc_bugzilla bash tests to upstream pytest
- BZ 773660: Clock skew errors logged to syslog
- BZ 869150: ldap_child handles missing keytab without segfault
- BZ 805281: Correct principal selected from multi-realm keytab
There was a problem hiding this comment.
Code Review
This pull request ports three bash tests for LDAP+Kerberos to pytest. The new tests are well-structured and cover important scenarios like clock skew handling, missing keytabs, and multi-realm principal selection. My review focuses on improving the robustness of the clock skew test by removing a hardcoded external dependency, which will make the test more reliable.
5e56975 to
83e1b5d
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request ports three LDAP+Kerberos tests from bash to pytest, which is a great improvement for maintainability. The new tests are well-structured and cover important bug-fix scenarios.
My review has identified a few issues that should be addressed:
- A critical issue in
requirements.txtwhere a dependency points to a personal fork. This must be changed to an official repository before merging. - The tests have some reliability concerns. One test depends on a hardcoded external NTP server, which can cause flakiness.
- Two tests lack robust resource cleanup (for keytab files). If a test fails, it could leave the system in a modified state and affect subsequent test runs. I've suggested using
try...finallyblocks to ensure cleanup always happens.
Addressing these points will improve the reliability and maintainability of the new tests.
45f0377 to
812552e
Compare
68ae3d4 to
dc51504
Compare
thalman
left a comment
There was a problem hiding this comment.
LGTM, thanks
We just have to wait for requirements.txt not to point to personal repo
dc51504 to
59a0f4e
Compare
59a0f4e to
91331cd
Compare
91331cd to
94dc5f3
Compare
|
Tested with IDM-CI, |
danlavu
left a comment
There was a problem hiding this comment.
This is great. We have quite a few more ldap/krb5 (multihost) tests. Before we move anymore should create a new topologycontroller that creates the host keytab and downloads it to the client to configures the client. I'm approving this now, and we can do that later, unless you want to do it now?
94dc5f3 to
a897ed9
Compare
Created the 3rd commit in same PR for topologycontroller, thanks for suggesting, |
|
Again tested with IDM-CI, |
a897ed9 to
dc410cd
Compare
dc410cd to
b666dc6
Compare
danlavu
left a comment
There was a problem hiding this comment.
This is great, thank you @madhuriupadhye
thalman
left a comment
There was a problem hiding this comment.
Tests looks good, thanks for the update.
Ping me when requirements.txt change is reverted an I will approve.
b666dc6 to
6b30c07
Compare
- Port three downstream krb_misc_bugzilla bash tests to upstream pytest - BZ 773660: Clock skew errors logged to syslog - BZ 869150: ldap_child handles missing keytab without segfault - BZ 805281: Correct principal selected from multi-realm keytab Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com> Reviewed-by: Dan Lavu <dlavu@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com>