diff --git a/src/tests/system/tests/test_ldap.py b/src/tests/system/tests/test_ldap.py index 5e3bef0ec53..9b909f59cfa 100644 --- a/src/tests/system/tests/test_ldap.py +++ b/src/tests/system/tests/test_ldap.py @@ -21,9 +21,13 @@ @pytest.mark.parametrize("use_ppolicy", ["true", "false"]) @pytest.mark.topology(KnownTopology.LDAP) @pytest.mark.parametrize("sssd_service_user", ("root", "sssd")) -@pytest.mark.require( - lambda client, sssd_service_user: ((sssd_service_user == "root") or client.features["non-privileged"]), - "SSSD was built without support for running under non-root", +@pytest.mark.skipif( + bool(lambda client, sssd_service_user: ((sssd_service_user != "root") and not client.features["non-privileged"])), + reason="SSSD was built without support for running under non-root", +) +@pytest.mark.skipif( + bool(lambda client: not client.features["ldap_use_ppolicy"]), + reason="SSSD is missing support for ldap_use_ppolicy.", ) def test_ldap__password_change(client: Client, ldap: LDAP, modify_mode: str, use_ppolicy: str, sssd_service_user: str): """ @@ -69,6 +73,10 @@ def test_ldap__password_change(client: Client, ldap: LDAP, modify_mode: str, use @pytest.mark.parametrize("modify_mode", ["exop", "ldap_modify"]) @pytest.mark.parametrize("use_ppolicy", ["true", "false"]) @pytest.mark.topology(KnownTopology.LDAP) +@pytest.mark.skipif( + bool(lambda client: not client.features["ldap_use_ppolicy"]), + reason="SSSD is missing support for ldap_use_ppolicy.", +) def test_ldap__password_change_new_passwords_do_not_match( client: Client, ldap: LDAP, modify_mode: str, use_ppolicy: str ): @@ -101,6 +109,10 @@ def test_ldap__password_change_new_passwords_do_not_match( @pytest.mark.parametrize("modify_mode", ["exop", "ldap_modify"]) @pytest.mark.parametrize("use_ppolicy", ["true", "false"]) @pytest.mark.topology(KnownTopology.LDAP) +@pytest.mark.skipif( + bool(lambda client: not client.features["ldap_use_ppolicy"]), + reason="SSSD is missing support for ldap_use_ppolicy.", +) def test_ldap__password_change_new_password_does_not_meet_complexity_requirements( client: Client, ldap: LDAP, modify_mode: str, use_ppolicy: str ): @@ -142,6 +154,10 @@ def test_ldap__password_change_new_password_does_not_meet_complexity_requirement @pytest.mark.parametrize("modify_mode", ["exop", "ldap_modify"]) @pytest.mark.parametrize("use_ppolicy", ["true", "false"]) @pytest.mark.topology(KnownTopology.LDAP) +@pytest.mark.skipif( + bool(lambda client: not client.features["ldap_use_ppolicy"]), + reason="SSSD is missing support for ldap_use_ppolicy.", +) def test_ldap__password_change_failed_current_password(client: Client, ldap: LDAP, modify_mode: str, use_ppolicy: str): """ :title: Password change failed because an incorrect password was used