From 9818c45d8826e898a95853e7e69cd4a280198212 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 8 Jun 2022 09:10:12 +0100 Subject: [PATCH] test(conftest): adjust `PATH` on macOS jobs only (not Vagrant) --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6c47deb..e718201 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,7 @@ log = logging.getLogger(__name__) @pytest.fixture(scope="session") def host(): - if os.environ.get("RUNNER_OS", "") == "macOS": + if os.environ.get("RUNNER_OS", "") == "macOS" and os.environ.get("KITCHEN_LOCAL_YAML", "") == "kitchen.macos.yml": # Adjust the `PATH` so that the `salt-call` executable can be found os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"]) return testinfra.get_host("local://", sudo=True)