Skip to content

Commit

Permalink
Run 'id' tests against SSSD running under both "root" and "sssd"
Browse files Browse the repository at this point in the history
(if supported)
  • Loading branch information
alexey-tikhonov committed Nov 25, 2023
1 parent 098bf64 commit 26ebaad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tests/system/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ git+https://github.com/next-actions/pytest-mh
git+https://github.com/next-actions/pytest-ticket
git+https://github.com/next-actions/pytest-tier
git+https://github.com/next-actions/pytest-output
git+https://github.com/SSSD/sssd-test-framework
git+https://github.com/alexey-tikhonov/sssd-test-framework@detect-sssd-user
6 changes: 5 additions & 1 deletion src/tests/system/tests/test_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

@pytest.mark.importance("critical")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
def test_id__getpwnam(client: Client, provider: GenericProvider):
@pytest.mark.parametrize("sssd_service_user", ("root", "sssd"))
def test_id__getpwnam(client: Client, provider: GenericProvider, sssd_service_user):
"""
:title: Resolve user by name with id
:setup:
Expand All @@ -31,6 +32,9 @@ def test_id__getpwnam(client: Client, provider: GenericProvider):
3. Users have correct ids
:customerscenario: False
"""
if not client.set_sssd_user(sssd_service_user):
pytest.skip("SSSD was built without support of running under non-root")

ids = [("user1", 10001), ("user2", 10002), ("user3", 10003)]
for user, id in ids:
provider.user(user).add(uid=id, gid=id + 500)
Expand Down

0 comments on commit 26ebaad

Please sign in to comment.