From 29743902636fcc2b57d67e9e8dde180c550d49f2 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 1 Aug 2023 08:26:02 +0100 Subject: [PATCH] Define `salt_factories_default_root_dir` to try and avoid SELinux error on Fedora 38 ``` Internal Server Error ("error setting label on mount source '/tmp': SELinux relabeling of /tmp is not allowed") ``` Signed-off-by: Pedro Algarvio --- tests/conftest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 4dfeb95c6aa..0f03df29f47 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -853,6 +853,22 @@ def groups_collection_modifyitems(config, items): # ----- Fixtures Overrides ------------------------------------------------------------------------------------------> +@pytest.fixture(scope="session") +def salt_factories_default_root_dir(salt_factories_default_root_dir): + """ + The root directory from where to base all salt-factories paths. + + For example, in a salt system installation, this would be ``/``. + + .. admonition:: Attention + + If `root_dir` is returned on the `salt_factories_config()` fixture + dictionary, then that's the value used, and not the one returned by + this fixture. + """ + return salt_factories_default_root_dir / "stsuite" + + @pytest.fixture(scope="session") def salt_factories_config(): """