11import configparser
22import os
3+ import platform
34import unittest
45
56from securenative .config .configuration_manager import ConfigurationManager
@@ -27,6 +28,7 @@ def create_ini_file(self, conf):
2728 with open (self .config_file_path , "w" ) as configfile :
2829 config .write (configfile )
2930
31+ @unittest .skipIf (platform .system () == "Windows" or platform .system () == "windows" , "test not supported on windows" )
3032 def test_parse_config_file_correctly (self ):
3133 try :
3234 os .remove (self .config_file_path )
@@ -72,6 +74,7 @@ def test_parse_config_file_correctly(self):
7274 self .assertEqual (options .max_events , "100" )
7375 self .assertEqual (options .timeout , "1500" )
7476
77+ @unittest .skipIf (platform .system () == "Windows" or platform .system () == "windows" , "test not supported on windows" )
7578 def test_ignore_unknown_config_in_properties_file (self ):
7679 try :
7780 os .remove (self .config_file_path )
@@ -100,6 +103,7 @@ def test_ignore_unknown_config_in_properties_file(self):
100103 self .assertIsNotNone (options )
101104 self .assertEqual (options .timeout , "1500" )
102105
106+ @unittest .skipIf (platform .system () == "Windows" or platform .system () == "windows" , "test not supported on windows" )
103107 def test_handle_invalid_config_file (self ):
104108 try :
105109 os .remove (self .config_file_path )
@@ -124,6 +128,7 @@ def test_handle_invalid_config_file(self):
124128
125129 self .assertIsNotNone (options )
126130
131+ @unittest .skipIf (platform .system () == "Windows" or platform .system () == "windows" , "test not supported on windows" )
127132 def ignore_invalid_config_file_entries (self ):
128133 try :
129134 os .remove (self .config_file_path )
@@ -223,6 +228,7 @@ def test_get_config_from_env_variables(self):
223228 self .assertEqual (options .log_level , "Debug" )
224229 self .assertEqual (options .fail_over_strategy , FailOverStrategy .FAIL_CLOSED .value )
225230
231+ @unittest .skipIf (platform .system () == "Windows" or platform .system () == "windows" , "test not supported on windows" )
226232 def test_default_values_for_invalid_enum_config_props (self ):
227233 try :
228234 os .remove (self .config_file_path )
0 commit comments