Skip to content

Commit

Permalink
TESTS: system: skip 'passkey' tests if SSSD runs under non-root
Browse files Browse the repository at this point in the history
For a real device this is handled by udev rule that makes device
readable by SSSD. This rule doesn't work with mocked device.
  • Loading branch information
alexey-tikhonov committed Feb 14, 2024
1 parent 7e31981 commit 8fd4c87
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/tests/system/tests/test_passkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def test_passkey__register__ipa(ipa: IPA, moduledatadir: str, testdatadir: str):
@pytest.mark.importance("critical")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su(client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str):
"""
:title: Check su authentication of user with LDAP, IPA, AD and Samba
Expand Down Expand Up @@ -116,6 +120,10 @@ def test_passkey__su(client: Client, provider: GenericProvider, moduledatadir: s
@pytest.mark.importance("high")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su_fail_pin(client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str):
"""
:title: Check su authentication deny of user with LDAP, IPA, AD and Samba with incorrect pin
Expand Down Expand Up @@ -150,6 +158,10 @@ def test_passkey__su_fail_pin(client: Client, provider: GenericProvider, moduled
@pytest.mark.importance("critical")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su_fail_mapping(client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str):
"""
:title: Check su authentication deny of user with LDAP, IPA, AD and Samba with incorrect mapping
Expand Down Expand Up @@ -186,6 +198,10 @@ def test_passkey__su_fail_mapping(client: Client, provider: GenericProvider, mod
@pytest.mark.importance("high")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su_srv_not_resolvable(
client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str
):
Expand Down Expand Up @@ -246,6 +262,10 @@ def test_passkey__su_srv_not_resolvable(
@pytest.mark.importance("high")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__offline_su(client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str):
"""
:title: Check offline su authentication of a user with LDAP, IPA, AD and Samba
Expand Down Expand Up @@ -339,6 +359,10 @@ def test_passkey__user_fetch_from_cache(
@pytest.mark.importance("high")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su_multi_keys_for_same_user(
client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str
):
Expand Down Expand Up @@ -378,6 +402,10 @@ def test_passkey__su_multi_keys_for_same_user(
@pytest.mark.importance("high")
@pytest.mark.topology(KnownTopologyGroup.AnyProvider)
@pytest.mark.builtwith(client="passkey", provider="passkey")
@pytest.mark.require(
lambda client: (client.svc.get_property("sssd", "User") == "root"),
"Currently passkey tests don't work if SSSD runs under non-root",
)
def test_passkey__su_same_key_for_multi_user(
client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str
):
Expand Down

0 comments on commit 8fd4c87

Please sign in to comment.