From 293f6b2d02688c96bf89ed4ffcf9e0cf1b7b3c8a Mon Sep 17 00:00:00 2001 From: Shane Lee Date: Fri, 15 Mar 2024 08:46:26 -0600 Subject: [PATCH] Skip state test on Windows --- tests/pytests/pkg/download/test_pkg_download.py | 2 +- tests/pytests/pkg/integration/test_salt_state_file.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/pytests/pkg/download/test_pkg_download.py b/tests/pytests/pkg/download/test_pkg_download.py index b774d9fa047..9a0fbd76bad 100644 --- a/tests/pytests/pkg/download/test_pkg_download.py +++ b/tests/pytests/pkg/download/test_pkg_download.py @@ -464,7 +464,7 @@ def setup_windows( try: arch = os.environ.get("SALT_REPO_ARCH") or "amd64" if package_type != "onedir": - root_dir = pathlib.Path(r"C:\Program Files\Salt Project\Salt") + root_dir = pathlib.Path(os.getenv("ProgramFiles"), "Salt Project", "Salt") if packaging.version.parse(salt_release) > packaging.version.parse("3005"): if package_type.lower() == "nsis": diff --git a/tests/pytests/pkg/integration/test_salt_state_file.py b/tests/pytests/pkg/integration/test_salt_state_file.py index 7b71fcb2365..1aadf3dbddb 100644 --- a/tests/pytests/pkg/integration/test_salt_state_file.py +++ b/tests/pytests/pkg/integration/test_salt_state_file.py @@ -5,6 +5,10 @@ import pytest from pytestskipmarkers.utils import platform from saltfactories.utils.functional import MultiStateResult +pytestmark = [ + pytest.mark.skip_on_windows, +] + @pytest.fixture def files(tmp_path):