HADOOP-15529. ContainerLaunch#testInvalidEnvVariableSubstitutionType is not supported in Windows. Contributed by Giovanni Matteo Fumarola.
(cherry picked from commit 6e756e8a62
)
This commit is contained in:
parent
0af3bea05d
commit
85f3105e61
|
@ -1732,7 +1732,11 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -1743,7 +1747,11 @@ public class TestContainerLaunch extends BaseContainerManagerTest {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue