From dc5289578f58545469b5e5e458e7b369258882d8 Mon Sep 17 00:00:00 2001 From: dosas Date: Wed, 6 Mar 2024 10:28:07 +0100 Subject: [PATCH] Add posibility to filter tests that require manifester --- 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 abf54997bd8..b7e0f8f6346 100644 --- a/pytest_plugins/markers.py +++ b/pytest_plugins/markers.py @@ -24,6 +24,7 @@ def pytest_configure(config): "no_containers: Disable container hosts from being used in favor of VMs", "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", ] markers.extend(module_markers()) for marker in markers: diff --git a/tests/foreman/conftest.py b/tests/foreman/conftest.py index 59616f233b7..92e147e8f7a 100644 --- a/tests/foreman/conftest.py +++ b/tests/foreman/conftest.py @@ -30,6 +30,8 @@ def pytest_collection_modifyitems(session, items, config): deselected_items = [] for item in items: + if any("manifest" in f for f in getattr(item, "fixturenames", ())): + item.add_marker("manifester") # 1. Deselect tests marked with @pytest.mark.deselect # WONTFIX BZs makes test to be dynamically marked as deselect. deselect = item.get_closest_marker('deselect')