From 09a235e8ef2d81426ce9243ba03cb806d94c19b6 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) --- 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')