diff --git a/src/tests/system/pytest.ini b/src/tests/system/pytest.ini index 92e4ce31ee..ecc40bc851 100644 --- a/src/tests/system/pytest.ini +++ b/src/tests/system/pytest.ini @@ -2,6 +2,14 @@ addopts = --strict-markers testpaths = tests markers = - slow: marks tests as slow (deselect with '-m "not slow"') - contains_workaround_for(gh=...,bz=...): test requires workaround for an existing bug + authentication: + authorization: + cache: + contains_workaround_for(gh=...,bz=...): + identity: + schema: + slow: + tools: ticket_tools = bz,gh,jira + +# For marker descriptions please look at https://tests.sssd.io/en/latest/marks.html diff --git a/src/tests/system/tests/test_autofs.py b/src/tests/system/tests/test_autofs.py index efe112231a..c756b9a2e2 100644 --- a/src/tests/system/tests/test_autofs.py +++ b/src/tests/system/tests/test_autofs.py @@ -13,6 +13,7 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("critical") @pytest.mark.ticket(gh=6739) @pytest.mark.parametrize("cache_first", [False, True]) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) @@ -60,6 +61,7 @@ def test_autofs__cache_first(client: Client, nfs: NFS, provider: GenericProvider } +@pytest.mark.importance("medium") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_autofs__propagate_offline__single_domain(client: Client, provider: GenericProvider): """ @@ -97,6 +99,7 @@ def test_autofs__propagate_offline__single_domain(client: Client, provider: Gene assert offline_status_propagated +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_autofs__propagate_offline__multi_domain(client: Client): """ @@ -144,6 +147,7 @@ def test_autofs__propagate_offline__multi_domain(client: Client): assert offline_status_propagated +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_autofs__offline_domains(client: Client, nfs: NFS, provider: GenericProvider): """ diff --git a/src/tests/system/tests/test_config.py b/src/tests/system/tests/test_config.py index 080be6911e..b4a522a05e 100644 --- a/src/tests/system/tests/test_config.py +++ b/src/tests/system/tests/test_config.py @@ -11,6 +11,7 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_config__change_config_while_sssd_running(client: Client): """ @@ -46,6 +47,8 @@ def test_config__change_config_while_sssd_running(client: Client): assert result["cn=pam,cn=config"]["debug_level"] == ["1"] +@pytest.mark.importance("critical") +@pytest.mark.config @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_config__genconf_particular_section(client: Client): """ @@ -91,6 +94,7 @@ def test_config__genconf_particular_section(client: Client): assert result["cn=nss,cn=config"]["debug_level"] == ["9"] +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_config__add_remove_section(client: Client): """ @@ -149,6 +153,7 @@ def test_config__add_remove_section(client: Client): assert result["cn=new_section,cn=config"]["key"] != ["value"] +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_config__genconf_no_such_section(client: Client): """ diff --git a/src/tests/system/tests/test_id.py b/src/tests/system/tests/test_id.py index dc759ef17f..8ee34b6f72 100644 --- a/src/tests/system/tests/test_id.py +++ b/src/tests/system/tests/test_id.py @@ -12,6 +12,7 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getpwnam(client: Client, provider: GenericProvider): """ @@ -44,6 +45,7 @@ def test_id__getpwnam(client: Client, provider: GenericProvider): assert result.user.id == uid, f"User id {result.user.id} is incorrect, {uid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getpwuid(client: Client, provider: GenericProvider): """ @@ -76,6 +78,7 @@ def test_id__getpwuid(client: Client, provider: GenericProvider): assert result.user.id == uid, f"User id {result.user.id} is incorrect, {uid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getgrnam(client: Client, provider: GenericProvider): """ @@ -108,6 +111,7 @@ def test_id__getgrnam(client: Client, provider: GenericProvider): assert result.gid == gid, f"Group gid {result.gid} is incorrect, {gid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getgrgid(client: Client, provider: GenericProvider): """ @@ -140,6 +144,7 @@ def test_id__getgrgid(client: Client, provider: GenericProvider): assert result.gid == gid, f"Group gid {result.gid} is incorrect, {gid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getent_passwd(client: Client, provider: GenericProvider): """ @@ -181,6 +186,7 @@ def test_id__getent_passwd(client: Client, provider: GenericProvider): assert result.uid == uid, f"User id {result.uid} is incorrect, {uid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getent_group(client: Client, provider: GenericProvider): """ @@ -220,6 +226,7 @@ def test_id__getent_group(client: Client, provider: GenericProvider): assert result.gid == id, f"Group gid {result.gid} is incorrect, {id} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__membership_by_group_name(client: Client, provider: GenericProvider): """ @@ -252,6 +259,7 @@ def test_id__membership_by_group_name(client: Client, provider: GenericProvider) assert result.memberof(groups), f"User {name} is member of wrong groups" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__membership_by_group_id(client: Client, provider: GenericProvider): """ @@ -285,6 +293,7 @@ def test_id__membership_by_group_id(client: Client, provider: GenericProvider): assert result.memberof(gids), f"User {name} is member of wrong groups" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__initgroups(client: Client, provider: GenericProvider): """ @@ -323,6 +332,7 @@ def test_id__initgroups(client: Client, provider: GenericProvider): assert result.memberof([10001, 10002, 10003]), f"User {name} is member of wrong groups" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__getpwnam_fully_qualified_names(client: Client, provider: GenericProvider): """ @@ -365,6 +375,7 @@ def test_id__getpwnam_fully_qualified_names(client: Client, provider: GenericPro assert result.user.id == 10002, f"User id {result.user.id} is incorrect, 10002 expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__case_insensitive(client: Client, provider: GenericProvider): """ @@ -409,6 +420,7 @@ def test_id__case_insensitive(client: Client, provider: GenericProvider): assert result.user.id == uid, f"User id {result.user.id} is incorrect, {uid} expected" +@pytest.mark.importance("critical") @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_id__fq_names_case_insensitive(client: Client, provider: GenericProvider): """ diff --git a/src/tests/system/tests/test_kcm.py b/src/tests/system/tests/test_kcm.py index 6a6ed020f5..942e867501 100644 --- a/src/tests/system/tests/test_kcm.py +++ b/src/tests/system/tests/test_kcm.py @@ -15,6 +15,8 @@ from sssd_test_framework.topology import KnownTopology +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) @pytest.mark.parametrize("ccache_storage", ["memory", "secdb"]) def test_kcm__kinit_overwrite(client: Client, kdc: KDC, ccache_storage: str): @@ -61,6 +63,8 @@ def test_kcm__kinit_overwrite(client: Client, kdc: KDC, ccache_storage: str): assert krb.cache_count() == 1 +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) @pytest.mark.parametrize("ccache_storage", ["memory", "secdb"]) def test_kcm__kinit_collection(client: Client, kdc: KDC, ccache_storage: str): @@ -150,6 +154,8 @@ def test_kcm__kinit_collection(client: Client, kdc: KDC, ccache_storage: str): assert krb.cache_count() == 0 +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) @pytest.mark.parametrize("ccache_storage", ["memory", "secdb"]) def test_kcm__kswitch(client: Client, kdc: KDC, ccache_storage: str): @@ -218,6 +224,8 @@ def test_kcm__kswitch(client: Client, kdc: KDC, ccache_storage: str): assert krb.has_tickets("bob", kdc.realm, [kdc.tgt, kdc.qualify("host/bob")]) +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) @pytest.mark.parametrize("ccache_storage", ["memory", "secdb"]) def test_kcm__subsidiaries(client: Client, kdc: KDC, ccache_storage: str): @@ -293,6 +301,8 @@ def test_kcm__subsidiaries(client: Client, kdc: KDC, ccache_storage: str): assert principals[kdc.qualify("bob")] == expected[kdc.qualify("bob")] +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) @pytest.mark.parametrize("ccache_storage", ["memory", "secdb"]) def test_kcm__kdestroy_nocache(client: Client, kdc: KDC, ccache_storage: str): @@ -327,6 +337,8 @@ def test_kcm__kdestroy_nocache(client: Client, kdc: KDC, ccache_storage: str): assert False, f"kdestroy raised an error: {e}" +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.topology(KnownTopology.Client) def test_kcm__tgt_renewal(client: Client, kdc: KDC): """ diff --git a/src/tests/system/tests/test_ldap.py b/src/tests/system/tests/test_ldap.py index 00f7522e72..d3c007e3d3 100644 --- a/src/tests/system/tests/test_ldap.py +++ b/src/tests/system/tests/test_ldap.py @@ -12,6 +12,8 @@ from sssd_test_framework.topology import KnownTopology +@pytest.mark.importance("critical") +@pytest.mark.authentication @pytest.mark.parametrize("modify_mode", ["exop", "ldap_modify"]) @pytest.mark.topology(KnownTopology.LDAP) def test_ldap__change_password(client: Client, ldap: LDAP, modify_mode: str): diff --git a/src/tests/system/tests/test_ldap_extra_attrs.py b/src/tests/system/tests/test_ldap_extra_attrs.py index 7f1e277800..cf3e6ce097 100644 --- a/src/tests/system/tests/test_ldap_extra_attrs.py +++ b/src/tests/system/tests/test_ldap_extra_attrs.py @@ -12,6 +12,8 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("high") +@pytest.mark.schema @pytest.mark.ticket(gh=4153, bz=1362023) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) @pytest.mark.parametrize("attrs", ["mail, firstname:givenname, lastname:sn", "given_email:mail"]) diff --git a/src/tests/system/tests/test_memory_cache.py b/src/tests/system/tests/test_memory_cache.py index 3099d6af0e..ad35d1d187 100644 --- a/src/tests/system/tests/test_memory_cache.py +++ b/src/tests/system/tests/test_memory_cache.py @@ -13,6 +13,8 @@ from sssd_test_framework.topology import KnownTopology, KnownTopologyGroup +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__getpwnam(client: Client, provider: GenericProvider): """ @@ -52,6 +54,8 @@ def check(users): check(users) +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__getgrnam(client: Client, provider: GenericProvider): """ @@ -91,6 +95,8 @@ def check(groups): check(groups) +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_passwd_getgrnam(client: Client, provider: GenericProvider): """ @@ -132,6 +138,8 @@ def check(groups): check(groups) +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_passwd_getpwnam(client: Client, provider: GenericProvider): """ @@ -177,6 +185,8 @@ def test_memory_cache__disabled_passwd_getpwnam(client: Client, provider: Generi assert client.tools.id(id) is None, f"User with id {id} was found which is not expected" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_intitgroups_getgrnam(client: Client, provider: GenericProvider): """ @@ -218,6 +228,8 @@ def check(groups): check(groups) +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_intitgroups_getpwnam(client: Client, provider: GenericProvider): """ @@ -271,6 +283,8 @@ def check(ids): check(ids) +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_group(client: Client, provider: GenericProvider): """ @@ -343,6 +357,8 @@ def check(users): assert client.tools.id(2222) is None, "Group with gid 2222 was found which is not expected" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__disabled_cache(client: Client, provider: GenericProvider): """ @@ -418,6 +434,8 @@ def test_memory_cache__disabled_cache(client: Client, provider: GenericProvider) assert client.tools.getent.group(2222) is None, "Group with gid 2222 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__membership_by_group_name(client: Client, provider: GenericProvider): """ @@ -469,6 +487,8 @@ def check(): check() +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__membership_by_group_id(client: Client, provider: GenericProvider): """ @@ -523,6 +543,8 @@ def check(): check() +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__user_gids(client: Client, provider: GenericProvider): """ @@ -577,6 +599,8 @@ def check(): check() +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__getpwnam_fully_qualified_names(client: Client, provider: GenericProvider): """ @@ -628,6 +652,8 @@ def check(): check() +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__case_insensitive(client: Client, provider: GenericProvider): """ @@ -689,6 +715,8 @@ def test_memory_cache__case_insensitive(client: Client, provider: GenericProvide assert client.tools.getent.initgroups("user1").groups == [], "User user1 should not be found in cache" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__fq_names_case_insensitive(client: Client, provider: GenericProvider): """ @@ -747,6 +775,8 @@ def test_memory_cache__fq_names_case_insensitive(client: Client, provider: Gener assert client.tools.getent.initgroups("uSer1").groups == [], "User uSer1 should be found only with fq name" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidation_of_gids_after_initgroups(client: Client, provider: GenericProvider): """ @@ -825,6 +855,8 @@ def check_group(name, gid): assert client.tools.getent.group("group1_") is None, "Group group1_ was found which is not expected" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__initgroups_without_change_in_membership(client: Client, provider: GenericProvider): """ @@ -912,6 +944,8 @@ def check(): check() +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_user_before_stop(client: Client, provider: GenericProvider): """ @@ -966,6 +1000,8 @@ def test_memory_cache__invalidate_user_before_stop(client: Client, provider: Gen assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_user_after_stop(client: Client, provider: GenericProvider): """ @@ -1020,6 +1056,8 @@ def test_memory_cache__invalidate_user_after_stop(client: Client, provider: Gene assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_users_before_stop(client: Client, provider: GenericProvider): """ @@ -1082,6 +1120,8 @@ def test_memory_cache__invalidate_users_before_stop(client: Client, provider: Ge assert client.tools.getent.group(222222) is None, "Group with gid 222222 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_users_after_stop(client: Client, provider: GenericProvider): """ @@ -1144,6 +1184,8 @@ def test_memory_cache__invalidate_users_after_stop(client: Client, provider: Gen assert client.tools.getent.group(222222) is None, "Group with gid 222222 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_group_before_stop(client: Client, provider: GenericProvider): """ @@ -1185,6 +1227,8 @@ def test_memory_cache__invalidate_group_before_stop(client: Client, provider: Ge assert client.tools.getent.group(110011) is None, "Group with gid 110011 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_group_after_stop(client: Client, provider: GenericProvider): """ @@ -1226,6 +1270,8 @@ def test_memory_cache__invalidate_group_after_stop(client: Client, provider: Gen assert client.tools.getent.group(110011) is None, "Group with gid 110011 was found which is not expected" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_groups_before_stop(client: Client, provider: GenericProvider): """ @@ -1271,6 +1317,8 @@ def test_memory_cache__invalidate_groups_before_stop(client: Client, provider: G assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("high") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_groups_after_stop(client: Client, provider: GenericProvider): """ @@ -1316,6 +1364,8 @@ def test_memory_cache__invalidate_groups_after_stop(client: Client, provider: Ge assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_everything_before_stop(client: Client, provider: GenericProvider): """ @@ -1385,6 +1435,8 @@ def test_memory_cache__invalidate_everything_before_stop(client: Client, provide assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__invalidate_everything_after_stop(client: Client, provider: GenericProvider): """ @@ -1454,6 +1506,8 @@ def test_memory_cache__invalidate_everything_after_stop(client: Client, provider assert client.tools.getent.group(202020) is None, "Group with gid 202020 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__memcache_timeout_zero(client: Client, provider: GenericProvider): """ @@ -1512,6 +1566,8 @@ def test_memory_cache__memcache_timeout_zero(client: Client, provider: GenericPr assert client.tools.getent.group(10001) is None, "Group with gid 10001 was found which is not expected" +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__removed_cache_without_invalidation(client: Client, provider: GenericProvider): """ diff --git a/src/tests/system/tests/test_netgroups.py b/src/tests/system/tests/test_netgroups.py index 9d874f1828..87ebafd21f 100644 --- a/src/tests/system/tests/test_netgroups.py +++ b/src/tests/system/tests/test_netgroups.py @@ -12,6 +12,8 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("medium") +@pytest.mark.cache @pytest.mark.ticket(gh=6652, bz=2162552) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_netgroups__add_remove_netgroup_triple(client: Client, provider: GenericProvider): @@ -54,6 +56,8 @@ def test_netgroups__add_remove_netgroup_triple(client: Client, provider: Generic assert len(result.members) == 0 +@pytest.mark.importance("medium") +@pytest.mark.cache @pytest.mark.ticket(gh=6652, bz=2162552) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_netgroups__add_remove_netgroup_member(client: Client, provider: GenericProvider): diff --git a/src/tests/system/tests/test_shadow.py b/src/tests/system/tests/test_shadow.py index 0bccc3cfdb..018a0f2183 100644 --- a/src/tests/system/tests/test_shadow.py +++ b/src/tests/system/tests/test_shadow.py @@ -12,6 +12,8 @@ from sssd_test_framework.topology import KnownTopology +@pytest.mark.importance("high") +@pytest.mark.schema @pytest.mark.ticket(bz=1507035) @pytest.mark.topology(KnownTopology.LDAP) @pytest.mark.parametrize("method", ["su", "ssh"]) diff --git a/src/tests/system/tests/test_sssctl.py b/src/tests/system/tests/test_sssctl.py index 4383ee99cc..26cae37fdd 100644 --- a/src/tests/system/tests/test_sssctl.py +++ b/src/tests/system/tests/test_sssctl.py @@ -11,6 +11,8 @@ from sssd_test_framework.topology import KnownTopology +@pytest.mark.importance("high") +@pytest.mark.tools @pytest.mark.ticket(bz=2100789) @pytest.mark.topology(KnownTopology.LDAP) def test_sssctl__check_id_provider(client: Client): @@ -38,6 +40,8 @@ def test_sssctl__check_id_provider(client: Client): assert "[rule/sssd_checks]: Attribute 'id_provider' is missing in section 'domain/test'." in output.stdout_lines[1] +@pytest.mark.importance("high") +@pytest.mark.tools @pytest.mark.ticket(bz=2100789) @pytest.mark.topology(KnownTopology.LDAP) def test_sssctl__check_invalid_id_provider(client: Client): diff --git a/src/tests/system/tests/test_sssctl_config_check.py b/src/tests/system/tests/test_sssctl_config_check.py index ee594a6b08..b1b5faa074 100644 --- a/src/tests/system/tests/test_sssctl_config_check.py +++ b/src/tests/system/tests/test_sssctl_config_check.py @@ -14,6 +14,8 @@ from sssd_test_framework.topology import KnownTopology +@pytest.mark.importance("high") +@pytest.mark.tools @pytest.mark.topology(KnownTopology.Client) def test_sssctl_config_check__typo_option_name(client: Client): """ @@ -41,6 +43,8 @@ def test_sssctl_config_check__typo_option_name(client: Client): assert pattern.search(result.stdout), "Wrong error message was returned" +@pytest.mark.importance("high") +@pytest.mark.tools @pytest.mark.topology(KnownTopology.Client) def test_sssctl_config_check__typo_domain_name(client: Client): """ @@ -64,6 +68,8 @@ def test_sssctl_config_check__typo_domain_name(client: Client): assert ex.match(r"Section \[domain\/\] is not allowed. Check for typos.*"), "Wrong error message was returned" +@pytest.mark.importance("high") +@pytest.mark.tools @pytest.mark.topology(KnownTopology.Client) def test_sssctl_config_check__misplaced_option(client: Client): """ diff --git a/src/tests/system/tests/test_sudo.py b/src/tests/system/tests/test_sudo.py index f32205d1ef..cf53e56f54 100644 --- a/src/tests/system/tests/test_sudo.py +++ b/src/tests/system/tests/test_sudo.py @@ -19,6 +19,8 @@ from sssd_test_framework.topology import KnownTopology, KnownTopologyGroup +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__user_allowed(client: Client, provider: GenericProvider): """ @@ -55,6 +57,8 @@ def test_sudo__user_allowed(client: Client, provider: GenericProvider): assert not client.auth.sudo.run("user-2", "Secret123", command="/bin/ls /root") +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.topology(KnownTopology.AD) @pytest.mark.topology(KnownTopology.LDAP) @pytest.mark.topology(KnownTopology.Samba) @@ -100,6 +104,8 @@ def test_sudo__duplicate_sudo_user(client: Client, provider: GenericProvider): assert not client.auth.sudo.run("user-4", "Secret123", command="/bin/ls /root") +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.ticket(bz=1380436, gh=4236) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__case_sensitive_false(client: Client, provider: GenericProvider): @@ -146,6 +152,8 @@ def test_sudo__case_sensitive_false(client: Client, provider: GenericProvider): assert client.auth.sudo.run("USER-1", "Secret123", command="/bin/more /root/test") +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__rules_refresh(client: Client, provider: GenericProvider): """ @@ -181,6 +189,8 @@ def test_sudo__rules_refresh(client: Client, provider: GenericProvider): assert client.auth.sudo.list("user-1", "Secret123", expected=["(root) /bin/less"]) +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.ticket(bz=1372440, gh=4236) @pytest.mark.contains_workaround_for(gh=4483) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) @@ -217,6 +227,8 @@ def test_sudo__sudo_user_is_group(client: Client, provider: GenericProvider): assert client.auth.sudo.run("user-1", "Secret123", command="/bin/ls /root") +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.ticket(bz=1826272, gh=5119) @pytest.mark.topology(KnownTopologyGroup.AnyAD) def test_sudo__sudo_user_is_nonposix_group(client: Client, provider: GenericADProvider): @@ -249,6 +261,8 @@ def test_sudo__sudo_user_is_nonposix_group(client: Client, provider: GenericADPr assert client.auth.sudo.run("user-1", "Secret123", command="/bin/ls /root") +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.ticket(bz=1910131) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__runasuser_shortname(client: Client, provider: GenericADProvider): @@ -276,6 +290,8 @@ def test_sudo__runasuser_shortname(client: Client, provider: GenericADProvider): assert client.auth.sudo.list("user-1", "Secret123", expected=["(user-2) /bin/ls"]) +@pytest.mark.importance("critical") +@pytest.mark.authorization @pytest.mark.topology(KnownTopology.AD) @pytest.mark.topology(KnownTopology.LDAP) @pytest.mark.topology(KnownTopology.Samba) @@ -308,6 +324,8 @@ def test_sudo__runasuser_fqn(client: Client, provider: GenericProvider): assert client.auth.sudo.list("user-1", "Secret123", expected=["(user-2) /bin/ls"]) +@pytest.mark.importance("low") +@pytest.mark.authorization @pytest.mark.topology(KnownTopology.LDAP) def test_sudo__sudonotbefore_shorttime(client: Client, provider: LDAP): """ @@ -362,8 +380,9 @@ def fulltime(t: datetime) -> str: ) -@pytest.mark.slow(seconds=15) @pytest.mark.importance("low") +@pytest.mark.authorization +@pytest.mark.slow(seconds=15) @pytest.mark.ticket(bz=1925514, gh=5609) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__refresh_random_offset(client: Client): @@ -403,8 +422,9 @@ def test_sudo__refresh_random_offset(client: Client): assert len(full) > 1 -@pytest.mark.slow(seconds=10) @pytest.mark.importance("low") +@pytest.mark.authorization +@pytest.mark.slow(seconds=10) @pytest.mark.ticket(bz=1925505, gh=5604) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) @pytest.mark.parametrize(["full_interval", "smart_interval"], [(2, 1), (3, 2)]) @@ -471,6 +491,8 @@ def is_smart_skipped(line: str) -> bool: is_skipped = True +@pytest.mark.importance("high") +@pytest.mark.authorization @pytest.mark.ticket(bz=1294670, gh=3969) @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_sudo__local_users_negative_cache(client: Client, provider: LDAP):