Commit 0ac6824e authored by Koehorst, Jasper's avatar Koehorst, Jasper
Browse files

before script removed

parent d36054be
Pipeline #14718 canceled with stage
......@@ -131,28 +131,6 @@ public class AppTest {
ApiClient client = Config.defaultClient();
checkKubernetesJobs(client);
}
@Before
public void setEnv() throws FileNotFoundException {
Scanner scanner = new Scanner(new File("config.txt"));
while (scanner.hasNextLine()) {
String[] line = scanner.nextLine().split("\\s+");
setEnv(line[0], line[1]);
}
}
public static void setEnv(String key, String value) {
try {
Map<String, String> env = System.getenv();
Class<?> cl = env.getClass();
Field field = cl.getDeclaredField("m");
field.setAccessible(true);
Map<String, String> writableEnv = (Map<String, String>) field.get(env);
writableEnv.put(key, value);
} catch (Exception e) {
throw new IllegalStateException("Failed to set environment variable", e);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment