Skip to content

Commit cd44bab

Browse files
author
Dan Lavu
committed
tests: adding group merging test
1 parent 8d28929 commit cd44bab

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/tests/system/tests/test_sssd.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,31 @@ def test_sssd__enabling_and_then_disabling_with_gssapi_feature(client: Client, p
295295
result = ssh.run(i, raise_on_error=False)
296296
assert result.rc != 0
297297
assert "sudo: a password is required" in result.stderr
298+
299+
300+
@pytest.mark.importance("high")
301+
@pytest.mark.ticket(jira="SSSD-7706")
302+
@pytest.mark.topology(KnownTopology.IPA)
303+
def test_sssd__nsswitch_conf_group_merging(client: Client, provider: GenericProvider):
304+
"""
305+
:title: NSSwitch merges two databases on group lookup
306+
:description: there is no configuration required, merging is the default behavior in authselect 1.5.x
307+
:setup:
308+
1. Create provider user ‘user1’
309+
2. Create provider group where the name and gid matches files on the client, ‘audio:*:63’
310+
3. Add ‘user1’ to provider group ‘audio’
311+
:steps:
312+
1. Lookup group
313+
2. Lookup group using only the files service
314+
:expectedresults:
315+
1. Group is found and ‘user1’ is a member
316+
2. Group is found and ‘user1’ is not a member
317+
:customerscenario: False
318+
"""
319+
group = "audio"
320+
gid = client.tools.getent.group(group).gid
321+
322+
provider.group(group).add(gid=gid).add_member(provider.user("user1").add())
323+
324+
assert "user1" in client.tools.getent.group(group).members, "'user1' is not a member of the group!"
325+
assert "user1" not in client.tools.getent.group(group, service = "files"), "'user1' should not be a member of the group!"

0 commit comments

Comments
 (0)