From 02f89dc1731cca36d3d6710d5cb3f3d94366429c 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 b7e0f8f6346..e5d9855a179 100644 --- a/pytest_plugins/markers.py +++ b/pytest_plugins/markers.py @@ -25,6 +25,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')