diff --git a/src/tests/system/pytest.ini b/src/tests/system/pytest.ini index 92e4ce31eef..554123e73a6 100644 --- a/src/tests/system/pytest.ini +++ b/src/tests/system/pytest.ini @@ -2,6 +2,13 @@ addopts = --strict-markers testpaths = tests markers = - slow: marks tests as slow (deselect with '-m "not slow"') + authentication: marks authentication test + authorization: marks authorization test + cache: marks any cache related test contains_workaround_for(gh=...,bz=...): test requires workaround for an existing bug + identity: marks identity, lookups test + schema: marks schema test + service: marks service, process test + slow: marks tests as slow (deselect with '-m "not slow"') + tools: marks cli tool test ticket_tools = bz,gh,jira diff --git a/src/tests/system/tests/test_autofs.py b/src/tests/system/tests/test_autofs.py index efe112231a3..f4ebf1f594b 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("critical") @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 080be6911ed..b4a522a05ee 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 dc759ef17fe..8ee34b6f729 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 aa7b61608c5..4f73dba0307 100644 --- a/src/tests/system/tests/test_kcm.py +++ b/src/tests/system/tests/test_kcm.py @@ -14,6 +14,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): @@ -60,6 +62,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): @@ -149,6 +153,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): @@ -217,6 +223,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): @@ -292,6 +300,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): @@ -326,6 +336,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 00f7522e728..d3c007e3d3e 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 7f1e2778000..cf3e6ce097a 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 c426f4d02c1..c632f2a226c 100644 --- a/src/tests/system/tests/test_memory_cache.py +++ b/src/tests/system/tests/test_memory_cache.py @@ -12,6 +12,8 @@ from sssd_test_framework.topology import KnownTopologyGroup +@pytest.mark.importance("critical") +@pytest.mark.cache @pytest.mark.topology(KnownTopologyGroup.AnyProvider) def test_memory_cache__getpwnam(client: Client, provider: GenericProvider): """ @@ -51,6 +53,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): """ @@ -90,6 +94,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): """ @@ -131,6 +137,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): """ @@ -176,6 +184,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): """ @@ -217,6 +227,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): """ @@ -270,6 +282,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): """ @@ -342,6 +356,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): """ @@ -417,6 +433,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): """ @@ -468,6 +486,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): """ @@ -522,6 +542,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): """ @@ -576,6 +598,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): """ @@ -627,6 +651,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): """ @@ -688,6 +714,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): """ @@ -746,6 +774,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): """ @@ -824,6 +854,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): """ @@ -911,6 +943,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): """ @@ -965,6 +999,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): """ @@ -1019,6 +1055,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): """ @@ -1081,6 +1119,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): """ @@ -1143,6 +1183,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): """ @@ -1184,6 +1226,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): """ @@ -1225,6 +1269,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): """ @@ -1270,6 +1316,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): """ @@ -1315,6 +1363,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): """ @@ -1384,6 +1434,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): """ @@ -1453,6 +1505,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): """ @@ -1511,6 +1565,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 9d874f1828f..87ebafd21f2 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 0bccc3cfdb6..018a0f21835 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 4383ee99cc8..26cae37fddf 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 14b3cfe2736..ebe17983fd0 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 f32205d1ef7..f057304bdf9 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("high") +@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):