From 3d7ebf028df816422b6cc6c718b7b5522f1bc2ff Mon Sep 17 00:00:00 2001 From: David Murphy Date: Wed, 14 Aug 2024 13:49:11 -0600 Subject: [PATCH] Removing tech debt and restoring original pytest.skip for tests --- tests/pytests/pkg/integration/test_enabled_disabled.py | 5 +---- tests/pytests/pkg/integration/test_salt_api.py | 2 +- tests/pytests/pkg/integration/test_salt_call.py | 4 ---- tests/pytests/pkg/integration/test_salt_exec.py | 2 +- tests/pytests/pkg/integration/test_salt_grains.py | 2 +- tests/pytests/pkg/integration/test_salt_key.py | 2 +- tests/pytests/pkg/integration/test_salt_output.py | 2 +- tests/pytests/pkg/integration/test_salt_state_file.py | 2 +- tests/pytests/pkg/integration/test_salt_user.py | 5 ++++- tests/pytests/pkg/integration/test_version.py | 9 +++++---- 10 files changed, 16 insertions(+), 19 deletions(-) diff --git a/tests/pytests/pkg/integration/test_enabled_disabled.py b/tests/pytests/pkg/integration/test_enabled_disabled.py index 9b98d47becd..43dd4d4366a 100644 --- a/tests/pytests/pkg/integration/test_enabled_disabled.py +++ b/tests/pytests/pkg/integration/test_enabled_disabled.py @@ -1,11 +1,8 @@ import pytest from pytestskipmarkers.utils import platform -pytestmark = [ - pytest.mark.skip_unless_on_linux, -] - +@pytest.mark.skip_on_windows(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_api.py b/tests/pytests/pkg/integration/test_salt_api.py index 8706ed9e630..e962fbe3221 100644 --- a/tests/pytests/pkg/integration/test_salt_api.py +++ b/tests/pytests/pkg/integration/test_salt_api.py @@ -1,7 +1,7 @@ import pytest pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_call.py b/tests/pytests/pkg/integration/test_salt_call.py index fe3bc1728aa..c16ecb67481 100644 --- a/tests/pytests/pkg/integration/test_salt_call.py +++ b/tests/pytests/pkg/integration/test_salt_call.py @@ -3,10 +3,6 @@ import subprocess import pytest from pytestskipmarkers.utils import platform -pytestmark = [ - pytest.mark.skip_unless_on_linux, -] - def test_salt_call_local(salt_call_cli): """ diff --git a/tests/pytests/pkg/integration/test_salt_exec.py b/tests/pytests/pkg/integration/test_salt_exec.py index cad14b6ba02..2e28999d7c3 100644 --- a/tests/pytests/pkg/integration/test_salt_exec.py +++ b/tests/pytests/pkg/integration/test_salt_exec.py @@ -3,7 +3,7 @@ from sys import platform import pytest pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_grains.py b/tests/pytests/pkg/integration/test_salt_grains.py index d8da338ec2c..2a609cb9ea0 100644 --- a/tests/pytests/pkg/integration/test_salt_grains.py +++ b/tests/pytests/pkg/integration/test_salt_grains.py @@ -1,7 +1,7 @@ import pytest pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_key.py b/tests/pytests/pkg/integration/test_salt_key.py index 4e8fb33ff7c..87275a677fa 100644 --- a/tests/pytests/pkg/integration/test_salt_key.py +++ b/tests/pytests/pkg/integration/test_salt_key.py @@ -1,7 +1,7 @@ import pytest pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_output.py b/tests/pytests/pkg/integration/test_salt_output.py index 3c008774473..b4d61044846 100644 --- a/tests/pytests/pkg/integration/test_salt_output.py +++ b/tests/pytests/pkg/integration/test_salt_output.py @@ -1,7 +1,7 @@ import pytest pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_state_file.py b/tests/pytests/pkg/integration/test_salt_state_file.py index 8e6c98b6fc0..0c4804654cb 100644 --- a/tests/pytests/pkg/integration/test_salt_state_file.py +++ b/tests/pytests/pkg/integration/test_salt_state_file.py @@ -6,7 +6,7 @@ from pytestskipmarkers.utils import platform from saltfactories.utils.functional import MultiStateResult pytestmark = [ - pytest.mark.skip_unless_on_linux, + pytest.mark.skip_on_windows, ] diff --git a/tests/pytests/pkg/integration/test_salt_user.py b/tests/pytests/pkg/integration/test_salt_user.py index 310d283f113..280b51624e2 100644 --- a/tests/pytests/pkg/integration/test_salt_user.py +++ b/tests/pytests/pkg/integration/test_salt_user.py @@ -8,7 +8,10 @@ import psutil import pytest from saltfactories.utils.tempfiles import temp_directory -pytestmark = [pytest.mark.skip_unless_on_linux] +pytestmark = [ + pytest.mark.skip_on_windows, + pytest.mark.skip_on_darwin, +] @pytest.fixture diff --git a/tests/pytests/pkg/integration/test_version.py b/tests/pytests/pkg/integration/test_version.py index 48cf7081702..cda02921108 100644 --- a/tests/pytests/pkg/integration/test_version.py +++ b/tests/pytests/pkg/integration/test_version.py @@ -5,11 +5,8 @@ import subprocess import pytest from pytestskipmarkers.utils import platform -pytestmark = [ - pytest.mark.skip_unless_on_linux, -] - +@pytest.mark.skip_on_windows def test_salt_version(version, install_salt): """ Test version output from salt --version @@ -37,6 +34,7 @@ def test_salt_version(version, install_salt): assert actual == expected +@pytest.mark.skip_on_windows def test_salt_versions_report_master(install_salt): """ Test running --versions-report on master @@ -57,6 +55,7 @@ def test_salt_versions_report_master(install_salt): ret.stdout.matcher.fnmatch_lines([f"*{py_version}*"]) +@pytest.mark.skip_on_windows def test_salt_versions_report_minion(salt_cli, salt_call_cli, salt_minion): """ Test running test.versions_report on minion @@ -140,6 +139,8 @@ def test_symlinks_created(version, symlink, install_salt): ret.stdout.matcher.fnmatch_lines([f"*{version}*"]) +@pytest.mark.skip_on_windows +@pytest.mark.skip_on_darwin def test_compare_pkg_versions_redhat_rc(version, install_salt): """ Test compare pkg versions for redhat RC packages. A tilde should be included