blob: 0d40a30e7164fe9b2f1c6d22f01f729e028b664e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package vid.automation.test.utils;
import org.onap.sdc.ci.tests.datatypes.Configuration;
import vid.automation.test.infra.FeaturesTogglingConfiguration;
public class TestConfigurationHelper {
private TestConfigurationHelper(){}
public static Configuration getEnvConfiguration() {
try {
String envUrl = System.getProperty("ENV_URL");
boolean isCustomLogin = Boolean.parseBoolean(System.getProperty("CUSTOM_LOGIN"));
Configuration configuration = new Configuration(envUrl, isCustomLogin);
String geckoDriverPath = System.getProperty("GECKO_PATH");
if(geckoDriverPath == null){
throw new RuntimeException("Missing path to gecko driver." +
" Make sure to provide path to the gecko driver executable with -DGECKO_PATH=<path>");
}
configuration.setGeckoDriverPath(geckoDriverPath);
FeaturesTogglingConfiguration.initializeFeatureManager();
return configuration;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
|