From a2334d8dd75877d4167214ea762dfeceb3c438b9 Mon Sep 17 00:00:00 2001
From: dosas <dosas@users.noreply.github.com>
Date: Tue, 12 Mar 2024 11:54:44 +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 e867e118be3..339eb6016f9 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')