From a7822b5f4afa01937d1b11c3800454d2e104ad56 Mon Sep 17 00:00:00 2001 From: dosas Date: Tue, 9 Apr 2024 09:46:51 +0200 Subject: [PATCH] Add filter for ldap related tests (#14540) (cherry picked from commit 21580fc40d64e0daaa31bf72d135bdd4d1fc9469) --- pytest_plugins/markers.py | 1 + tests/foreman/conftest.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pytest_plugins/markers.py b/pytest_plugins/markers.py index 1df9f8e9013..7d5c0865582 100644 --- a/pytest_plugins/markers.py +++ b/pytest_plugins/markers.py @@ -24,6 +24,7 @@ def pytest_configure(config): "include_capsule: For satellite-maintain tests to run on Satellite and Capsule both", "capsule_only: For satellite-maintain tests to run only on Capsules", "manifester: Tests that require manifester", + "ldap: Tests related to ldap authentication", ] markers.extend(module_markers()) for marker in markers: diff --git a/tests/foreman/conftest.py b/tests/foreman/conftest.py index 339eb6016f9..1be6ba294e6 100644 --- a/tests/foreman/conftest.py +++ b/tests/foreman/conftest.py @@ -32,6 +32,8 @@ def pytest_collection_modifyitems(session, items, config): for item in items: if any("manifest" in f for f in getattr(item, "fixturenames", ())): item.add_marker("manifester") + if any("ldap" in f for f in getattr(item, "fixturenames", ())): + item.add_marker("ldap") # 1. Deselect tests marked with @pytest.mark.deselect # WONTFIX BZs makes test to be dynamically marked as deselect. deselect = item.get_closest_marker('deselect')