From 81598d085377fde003c497827904d3c11dbaf0d7 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Wed, 14 Aug 2024 15:44:01 -0600 Subject: [PATCH] Limit test to Linux which use systemctl --- tests/pytests/pkg/integration/test_enabled_disabled.py | 2 +- tests/pytests/pkg/integration/test_salt_ufw.py | 5 ++++- tests/pytests/pkg/integration/test_salt_user.py | 3 +-- tests/pytests/pkg/integration/test_systemd_config.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/pytests/pkg/integration/test_enabled_disabled.py b/tests/pytests/pkg/integration/test_enabled_disabled.py index 43dd4d4366a0..4cfa5d2adc13 100644 --- a/tests/pytests/pkg/integration/test_enabled_disabled.py +++ b/tests/pytests/pkg/integration/test_enabled_disabled.py @@ -2,7 +2,7 @@ from pytestskipmarkers.utils import platform -@pytest.mark.skip_on_windows(reason="Linux test only") +@pytest.mark.skip_unless_on_linux(reason="Linux test only") def test_services(install_salt, salt_call_cli): """ Check if Services are enabled/disabled diff --git a/tests/pytests/pkg/integration/test_salt_ufw.py b/tests/pytests/pkg/integration/test_salt_ufw.py index eebf0e2f014d..0e0471aebf24 100644 --- a/tests/pytests/pkg/integration/test_salt_ufw.py +++ b/tests/pytests/pkg/integration/test_salt_ufw.py @@ -2,6 +2,10 @@ import pytest +pytestmark = [ + pytest.mark.skip_unless_on_linux, +] + @pytest.fixture def salt_systemd_setup( @@ -26,7 +30,6 @@ def salt_systemd_setup( assert ret.returncode == 0 -@pytest.mark.skip_on_windows @pytest.mark.skip_if_binaries_missing("ufw") def test_salt_ufw(salt_systemd_setup, salt_call_cli, install_salt): """ diff --git a/tests/pytests/pkg/integration/test_salt_user.py b/tests/pytests/pkg/integration/test_salt_user.py index 9e3d3f0de004..fb42ae3c9f6b 100644 --- a/tests/pytests/pkg/integration/test_salt_user.py +++ b/tests/pytests/pkg/integration/test_salt_user.py @@ -9,8 +9,7 @@ from saltfactories.utils.tempfiles import temp_directory pytestmark = [ - pytest.mark.skip_on_windows, - pytest.mark.skip_on_darwin, + pytest.mark.skip_unless_on_linux, ] diff --git a/tests/pytests/pkg/integration/test_systemd_config.py b/tests/pytests/pkg/integration/test_systemd_config.py index 828e4413ad77..5f705eb2ee91 100644 --- a/tests/pytests/pkg/integration/test_systemd_config.py +++ b/tests/pytests/pkg/integration/test_systemd_config.py @@ -3,7 +3,7 @@ import pytest pytestmark = [ - pytest.mark.skip_on_windows(reason="Linux test only"), + pytest.mark.skip_unless_on_linux, ]