HADOOP-15529. ContainerLaunch#testInvalidEnvVariableSubstitutionType is not supported in Windows. Contributed by Giovanni Matteo Fumarola.

This commit is contained in:
Inigo Goiri 2018-06-12 10:24:34 -07:00
parent 10d0e4be6e
commit 6e756e8a62
1 changed files with 10 additions and 2 deletions

View File

@ -1920,7 +1920,11 @@ public void testShellScriptBuilderWithNoRedirection() throws IOException {
public void testInvalidEnvVariableSubstitutionType1() throws IOException {
Map<String, String> env = new HashMap<String, String>();
// invalid env
env.put("testVar", "version${foo.version}");
String invalidEnv = "version${foo.version}";
if (Shell.WINDOWS) {
invalidEnv = "version%foo%<>^&|=:version%";
}
env.put("testVar", invalidEnv);
validateShellExecutorForDifferentEnvs(env);
}
@ -1931,7 +1935,11 @@ public void testInvalidEnvVariableSubstitutionType1() throws IOException {
public void testInvalidEnvVariableSubstitutionType2() throws IOException {
Map<String, String> env = new HashMap<String, String>();
// invalid env
env.put("testPath", "/abc:/${foo.path}:/$bar");
String invalidEnv = "/abc:/${foo.path}:/$bar";
if (Shell.WINDOWS) {
invalidEnv = "/abc:/%foo%<>^&|=:path%:/%bar%";
}
env.put("testPath", invalidEnv);
validateShellExecutorForDifferentEnvs(env);
}