-
Notifications
You must be signed in to change notification settings - Fork 250
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
Tests: ldap search base does not fully limit the Netgroup search base #7754
base: master
Are you sure you want to change the base?
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.
- see inline comments
- Should this be backported to sssd-2-10 or/and other branches?
src/tests/system/tests/test_ldap.py
Outdated
assert "(h1,QEuser,ldap.test)" in result.members | ||
|
||
client.sssd.dom("test")["ldap_search_base"] = "ou=Netgroup1,dc=ldap,dc=test" | ||
client.sssd.stop() |
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.
We should have a function for restarting sssd with cleaning.
src/tests/system/tests/test_ldap.py
Outdated
2. Members are added to netgroups | ||
3. The ldap search base is reconfigured to only include ou=Netgroup1 | ||
:steps: | ||
1. The provider role is ldap, "Seceng" should still be resolvable, |
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.
What is Seceng?
src/tests/system/tests/test_ldap.py
Outdated
client.sssd.start() | ||
result = client.tools.getent.netgroup("Seceng") | ||
assert result is not None | ||
assert result.name == "Seceng" |
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.
assert result is not None and result.name == "Seceng", "Netgroup Seceng was not found!"
src/tests/system/tests/test_ldap.py
Outdated
1. The provider role is ldap, "Seceng" should still be resolvable, | ||
validating that the ldap search base does not disrupt resolution of netgroups in ou1. | ||
:expectedresults: | ||
1. id look up should success |
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.
Please fix the steps to match meaningfully the asserts. setup 3. is probably test step as You are doing it in the middle of asserts.
src/tests/system/tests/test_ldap.py
Outdated
result = client.tools.getent.netgroup("Seceng") | ||
assert result is not None | ||
assert result.name == "Seceng" | ||
assert "(h1,QEuser,ldap.test)" in result.members |
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.
Add a meaningful error message here.
315c884
to
7b0ca0a
Compare
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.
I had a set of inline comments prepared for this test case, but the more I went through it the less I understood, so I decided to remove them and ask the following question: What are you trying to test? Can you specify it in the form of a use case?
Here sssd-ldap option "ldap_search_base" is being tested . Here in this test "ou=Netgroup1,dc=ldap,dc=test" is set as ldap_search_base and ldap_search should limit to this OU only |
da07476
to
7cb4165
Compare
f430949
to
aed8c45
Compare
ldap search base does not fully limit the Netgroup search base
ldap search base does not fully limit the Netgroup search base