YARN-7917. Fix failing test TestDockerContainerRuntime#testLaunchContainerWithDockerTokens. Contributed by Shane Kumpf
This commit is contained in:
parent
96bb6a51ec
commit
3414fd1243
@ -1775,7 +1775,7 @@ public void testLaunchContainerWithDockerTokens()
|
|||||||
List<String> dockerCommands = Files
|
List<String> dockerCommands = Files
|
||||||
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
||||||
|
|
||||||
int expected = 15;
|
int expected = 16;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
Assert.assertEquals(expected, dockerCommands.size());
|
Assert.assertEquals(expected, dockerCommands.size());
|
||||||
Assert.assertEquals("[docker-command-execution]",
|
Assert.assertEquals("[docker-command-execution]",
|
||||||
@ -1797,12 +1797,12 @@ public void testLaunchContainerWithDockerTokens()
|
|||||||
dockerCommands.get(counter++));
|
dockerCommands.get(counter++));
|
||||||
Assert.assertEquals(" name=container_id", dockerCommands.get(counter++));
|
Assert.assertEquals(" name=container_id", dockerCommands.get(counter++));
|
||||||
Assert.assertEquals(" net=host", dockerCommands.get(counter++));
|
Assert.assertEquals(" net=host", dockerCommands.get(counter++));
|
||||||
|
Assert.assertEquals(" ro-mounts=/test_filecache_dir:/test_filecache_dir,"
|
||||||
|
+ "/test_user_filecache_dir:/test_user_filecache_dir",
|
||||||
|
dockerCommands.get(counter++));
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
" rw-mounts=/test_container_local_dir:/test_container_local_dir,"
|
" rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
||||||
+ "/test_filecache_dir:/test_filecache_dir,"
|
+ "/test_application_local_dir:/test_application_local_dir",
|
||||||
+ "/test_container_work_dir:/test_container_work_dir,"
|
|
||||||
+ "/test_container_log_dir:/test_container_log_dir,"
|
|
||||||
+ "/test_user_local_dir:/test_user_local_dir",
|
|
||||||
dockerCommands.get(counter++));
|
dockerCommands.get(counter++));
|
||||||
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
||||||
Assert.assertEquals(" workdir=/test_container_work_dir",
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
||||||
|
Loading…
Reference in New Issue
Block a user