|
4 | 4 | import com.securenative.enums.FailoverStrategy; |
5 | 5 | import com.securenative.exceptions.SecureNativeConfigException; |
6 | 6 | import org.junit.jupiter.api.*; |
7 | | -import org.junit.Ignore; |
| 7 | +import org.junit.*; |
8 | 8 | import org.mockito.Mockito; |
9 | 9 |
|
10 | 10 | import java.io.ByteArrayInputStream; |
|
15 | 15 |
|
16 | 16 | import static org.assertj.core.api.Assertions.assertThat; |
17 | 17 |
|
18 | | -class NotRunningOnWindows implements IgnoreCondition { |
19 | | - public boolean isSatisfied() { |
20 | | - return !System.getProperty("os.name").startsWith("Windows"); |
21 | | - } |
22 | | -} |
23 | | - |
24 | 18 | @TestMethodOrder(MethodOrderer.OrderAnnotation.class) |
25 | 19 | public class ConfigurationManagerTest { |
26 | 20 | @SuppressWarnings({ "unchecked" }) |
@@ -174,7 +168,7 @@ public void loadDefaultConfigTest() throws SecureNativeConfigException { |
174 | 168 | @Order(6) |
175 | 169 | @Timeout(value = 1000, unit = TimeUnit.MILLISECONDS) |
176 | 170 | @DisplayName("Should get config via env variables") |
177 | | - @ConditionalIgnore(condition = NotRunningOnWindows.class) |
| 171 | + @DisabledOnOs(OS.WINDOWS) |
178 | 172 | public void getConfigFromEnvVariablesTest() throws SecureNativeConfigException, ReflectiveOperationException { |
179 | 173 | setEnv("SECURENATIVE_API_KEY", "SOME_ENV_API_KEY"); |
180 | 174 | setEnv("SECURENATIVE_API_URL", "SOME_API_URL"); |
@@ -213,7 +207,7 @@ public void getConfigFromEnvVariablesTest() throws SecureNativeConfigException, |
213 | 207 | @Order(7) |
214 | 208 | @Timeout(value = 1000, unit = TimeUnit.MILLISECONDS) |
215 | 209 | @DisplayName("Should overwrite env variables with vales from config file") |
216 | | - @ConditionalIgnore(condition = NotRunningOnWindows.class) |
| 210 | + @DisabledOnOs(OS.WINDOWS) |
217 | 211 | public void overwriteEnvVariablesWithConfigFileTest() throws SecureNativeConfigException, ReflectiveOperationException { |
218 | 212 | String config = String.join(System.getProperty("line.separator"), |
219 | 213 | "SECURENATIVE_API_KEY=API_KEY_FROM_FILE", |
|
0 commit comments