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