From 4b119ab4cedabf0b8dc84e8b9a35ee7edf3d74e9 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 8 Jun 2021 06:35:15 -0400 Subject: [PATCH] island: Skip some island_config_options_validator tests on Windows --- .../cc/setup/test_island_config_options_validator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monkey/tests/unit_tests/monkey_island/cc/setup/test_island_config_options_validator.py b/monkey/tests/unit_tests/monkey_island/cc/setup/test_island_config_options_validator.py index 9c2353c5b..1b1be6718 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/setup/test_island_config_options_validator.py +++ b/monkey/tests/unit_tests/monkey_island/cc/setup/test_island_config_options_validator.py @@ -26,6 +26,7 @@ def island_config_options(tmpdir, create_empty_file): ) +@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") def test_valid_crt_and_key_paths(island_config_options): try: raise_on_invalid_options(island_config_options) @@ -34,6 +35,7 @@ def test_valid_crt_and_key_paths(island_config_options): assert False +@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") def test_crt_path_does_not_exist(island_config_options): os.remove(island_config_options.crt_path) @@ -41,6 +43,7 @@ def test_crt_path_does_not_exist(island_config_options): raise_on_invalid_options(island_config_options) +@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") def test_crt_path_insecure_permissions(island_config_options): os.chmod(island_config_options.crt_path, 0o777) @@ -48,6 +51,7 @@ def test_crt_path_insecure_permissions(island_config_options): raise_on_invalid_options(island_config_options) +@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") def test_key_path_does_not_exist(island_config_options): os.remove(island_config_options.key_path) @@ -55,6 +59,7 @@ def test_key_path_does_not_exist(island_config_options): raise_on_invalid_options(island_config_options) +@pytest.mark.skipif(os.name != "posix", reason="Tests Posix (not Windows) permissions.") def test_key_path_insecure_permissions(island_config_options): os.chmod(island_config_options.key_path, 0o777)