-
Notifications
You must be signed in to change notification settings - Fork 256
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: Test trasformation SSSD does not crash in nss responder after … #7831
base: master
Are you sure you want to change the base?
Conversation
e798b58
to
05ae5f2
Compare
if isinstance(provider, (AD)): | ||
bad_ldap_uri = "typo.dc.%s" % hostname | ||
client.sssd.dom("test").update(ad_server=bad_ldap_uri) |
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.
if isinstance(provider, (AD)): | |
bad_ldap_uri = "typo.dc.%s" % hostname | |
client.sssd.dom("test").update(ad_server=bad_ldap_uri) | |
if isinstance(provider, (AD)) or isinstance(provider, (Samba)): | |
bad_ldap_uri = "typo.dc.%s" % hostname | |
client.sssd.dom("test").update(ad_server=bad_ldap_uri) |
if isinstance(provider, (Samba)): | ||
bad_ldap_uri = "typo.dc.%s" % hostname | ||
client.sssd.dom("test").update(ad_server=bad_ldap_uri) |
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.
if isinstance(provider, (Samba)): | |
bad_ldap_uri = "typo.dc.%s" % hostname | |
client.sssd.dom("test").update(ad_server=bad_ldap_uri) |
bad_ldap_uri = "typo.dc.%s" % hostname | ||
client.sssd.dom("test").update(ad_server=bad_ldap_uri) | ||
|
||
if isinstance(provider, (IPA)): |
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.
if isinstance(provider, (IPA)): | |
elif isinstance(provider, (IPA)): |
bad_ldap_uri = "typo.dc.%s" % hostname | ||
client.sssd.dom("test").update(ad_server=bad_ldap_uri) | ||
|
||
if isinstance(provider, (LDAP)): |
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.
if isinstance(provider, (LDAP)): | |
elif isinstance(provider, (LDAP)): |
client.host.conn.run(pgrep) | ||
|
||
pid_nss2 = client.host.conn.run(pid_nss).stdout | ||
assert pid_nss1 == pid_nss2 |
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 add meaningfull assert message.
|
||
|
||
@pytest.mark.importance("low") | ||
@pytest.mark.ticket(bz=1406437) |
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 think that we can drop the allocation error check and if everything else is covered elsewhere drop it altogether.
@pytest.mark.topology(KnownTopologyGroup.AnyProvider) | ||
def test_netgroup__nss_responder(client: Client, provider: GenericProvider): | ||
""" | ||
:title: SSSD does not crash in nss responder after netgroup timeout when backend is offline |
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.
:title: SSSD does not crash in nss responder after netgroup timeout when backend is offline | |
:title: SSSD nss responder handles correctly netgroup timeout when backend is offline |
6. Verify that the SSSD processes (sssd, sssd_be, sssd_nss, sssd_pam) are still running and that the | ||
sssd_nss process ID has not changed, indicating that SSSD has not crashed or restarted unexpectedly | ||
:expectedresults: | ||
1. SSSD configured with incorrect server backend |
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.
1. SSSD configured with incorrect server backend | |
1. SSSD configured with incorrect server URI |
1. Depending on the type of provider (AD, IPA, Samba, or LDAP), the script updates the SSSD configuration | ||
with an incorrect server URI (e.g., typo.dc.hostname) | ||
2. SSSD is restarted again to apply the new configuration | ||
3. Checks the status of the SSSD domain to ensure it is offline due to the misconfigured server |
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.
3. Checks the status of the SSSD domain to ensure it is offline due to the misconfigured server | |
3. Check the status of the SSSD domain. |
:expectedresults: | ||
1. SSSD configured with incorrect server backend | ||
2. SSSD restarted | ||
3. SSSD Offline |
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.
3. SSSD Offline | |
3. SSSD domain is offline |
2. SSSD restarted | ||
3. SSSD Offline | ||
4. Pid of sssd_nss captured | ||
5. Netgroup info cant be retrieve |
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.
5. Netgroup info cant be retrieve | |
5. Netgroup info can't be retrieved. |
3. SSSD Offline | ||
4. Pid of sssd_nss captured | ||
5. Netgroup info cant be retrieve | ||
6. SSSD not crashed |
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.
6. SSSD not crashed | |
6. SSSD nss responder has the same pid as before. |
result = client.tools.getent.netgroup(netgroup.name) | ||
assert result is not None | ||
assert result.members[0].user == "user-1" |
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.
result = client.tools.getent.netgroup(netgroup.name) | |
assert result is not None | |
assert result.members[0].user == "user-1" |
Not a test step.
netgroup = provider.netgroup("ng-1").add().add_member(user=user) | ||
|
||
result = client.tools.getent.netgroup(netgroup.name) | ||
assert result is not None |
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 | |
assert result is not None, "Could not get netgroup ng-1" |
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
…netgroup timeout when backend is offline SSSD does not crash in nss responder after netgroup timeout when backend is offline
…netgroup timeout when backend is offline
SSSD does not crash in nss responder after netgroup timeout when backend is offline