Skip to content

Commit 64194c5

Browse files
author
Dan Lavu
committed
adding subid test
1 parent a9f9c5c commit 64194c5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/tests/system/tests/test_ipa.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,3 +640,42 @@ def test_ipa__switch_user_with_smartcard_authentication(client: Client, ipa: IPA
640640
assert (
641641
"ipacertuser1" in result.stdout
642642
), f"'ipacertuser1' not found in 'whoami' output! Stdout content: {result.stdout}"
643+
644+
645+
@pytest.mark.importance("high")
646+
@pytest.mark.topology(KnownTopology.IPA)
647+
def test_ipa__subids_configured(client: Client, ipa: IPA):
648+
"""
649+
:title: Subids are configured in IPA
650+
:setup:
651+
1. Create a user with generated subids
652+
2. Configure and start SSSD with subids
653+
:steps:
654+
1. Lookup the uid start range and range size
655+
2. Lookup the gid start range and range size
656+
:expectedresults:
657+
1. The values from the client matches the server values
658+
2. The values from the client matches the server values
659+
:customerscenario: False
660+
"""
661+
user = ipa.user("user1").add()
662+
subid = user.subid().generate()
663+
664+
client.sssd.common.subid()
665+
client.sssd.start()
666+
667+
uid = client.tools.getsubid("user1")
668+
assert (
669+
subid.uid_start == uid.range_start
670+
), f"Subordinate UID start range {uid.range_start} does not match: {subid.uid_start}!"
671+
assert (
672+
subid.uid_size == uid.range_size
673+
), f"Subordinate UID start range {uid.range_size} does not match: {subid.uid_size}!"
674+
675+
gid = client.tools.getsubid("user1", group=True)
676+
assert (
677+
subid.gid_start == gid.range_start
678+
), f"Subordinate GID start range {gid.range_start} does not match: {subid.gid_start}!"
679+
assert (
680+
subid.gid_size == gid.range_size
681+
), f"Subordinate GID start range {gid.range_size} does not match: {subid.gid_size}!"

0 commit comments

Comments
 (0)