|
@@ -389,7 +389,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -406,17 +406,16 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -440,7 +439,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- Assert.assertEquals(14, dockerCommands.size());
|
|
|
+ Assert.assertEquals(13, dockerCommands.size());
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
|
dockerCommands.get(counter++));
|
|
@@ -456,18 +455,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -555,7 +553,7 @@ public class TestDockerContainerRuntime {
|
|
|
//This is the expected docker invocation for this case
|
|
|
List<String> dockerCommands = Files
|
|
|
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -574,18 +572,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert
|
|
|
.assertEquals(" net=" + allowedNetwork, 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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -615,7 +612,7 @@ public class TestDockerContainerRuntime {
|
|
|
//This is the expected docker invocation for this case
|
|
|
List<String> dockerCommands = Files
|
|
|
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -634,18 +631,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -685,7 +681,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files
|
|
|
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -706,16 +702,16 @@ public class TestDockerContainerRuntime {
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
- " name=container_e11_1518975676334_14532816_01_000001",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(" net=sdn1", dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(" ro-mounts=/test_filecache_dir:/test_filecache_dir,"
|
|
|
- + "/test_user_filecache_dir:/test_user_filecache_dir",
|
|
|
+ " mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
+ " name=container_e11_1518975676334_14532816_01_000001",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" net=sdn1", dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -754,18 +750,16 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
-
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" net=sdn2", 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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -803,7 +797,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
|
|
|
String command = dockerCommands.get(0);
|
|
@@ -854,7 +848,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -871,18 +865,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" net=host", dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" pid=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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -907,7 +900,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
|
|
|
String command = dockerCommands.get(0);
|
|
@@ -1016,7 +1009,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1031,18 +1024,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" net=host", dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" privileged=true", 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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + submittingUser,
|
|
|
dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
@@ -1103,7 +1095,7 @@ public class TestDockerContainerRuntime {
|
|
|
|
|
|
env.put(
|
|
|
DockerLinuxContainerRuntime.ENV_DOCKER_CONTAINER_MOUNTS,
|
|
|
- "source");
|
|
|
+ "/source");
|
|
|
|
|
|
try {
|
|
|
runtime.launchContainer(builder.build());
|
|
@@ -1133,7 +1125,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1150,19 +1142,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/test_local_dir/test_resource_file:test_mount:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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,"
|
|
|
- + "/test_local_dir/test_resource_file:test_mount",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -1189,7 +1179,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1206,20 +1196,18 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/test_local_dir/test_resource_file:test_mount1:ro,"
|
|
|
+ + "/test_local_dir/test_resource_file:test_mount2:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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,"
|
|
|
- + "/test_local_dir/test_resource_file:test_mount1,"
|
|
|
- + "/test_local_dir/test_resource_file:test_mount2",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -1235,7 +1223,8 @@ public class TestDockerContainerRuntime {
|
|
|
|
|
|
env.put(
|
|
|
DockerLinuxContainerRuntime.ENV_DOCKER_CONTAINER_MOUNTS,
|
|
|
- "/tmp/foo:/tmp/foo:ro,/tmp/bar:/tmp/bar:rw");
|
|
|
+ "/tmp/foo:/tmp/foo:ro,/tmp/bar:/tmp/bar:rw,/tmp/baz:/tmp/baz," +
|
|
|
+ "/a:/a:shared,/b:/b:ro+shared,/c:/c:rw+rshared,/d:/d:private");
|
|
|
|
|
|
runtime.launchContainer(builder.build());
|
|
|
PrivilegedOperation op = capturePrivilegedOperationAndVerifyArgs();
|
|
@@ -1245,7 +1234,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1262,19 +1251,19 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/tmp/foo:/tmp/foo:ro,"
|
|
|
+ + "/tmp/bar:/tmp/bar:rw,/tmp/baz:/tmp/baz:rw,/a:/a:rw+shared,"
|
|
|
+ + "/b:/b:ro+shared,/c:/c:rw+rshared,/d:/d:rw+private",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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,"
|
|
|
- + "/tmp/foo:/tmp/foo",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir,"
|
|
|
- + "/tmp/bar:/tmp/bar",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -1288,7 +1277,7 @@ public class TestDockerContainerRuntime {
|
|
|
|
|
|
env.put(
|
|
|
DockerLinuxContainerRuntime.ENV_DOCKER_CONTAINER_MOUNTS,
|
|
|
- "source:target");
|
|
|
+ "/source:target:ro,/source:target:other,/source:target:rw");
|
|
|
|
|
|
try {
|
|
|
runtime.launchContainer(builder.build());
|
|
@@ -1306,7 +1295,7 @@ public class TestDockerContainerRuntime {
|
|
|
|
|
|
env.put(
|
|
|
DockerLinuxContainerRuntime.ENV_DOCKER_CONTAINER_MOUNTS,
|
|
|
- "source:target:other");
|
|
|
+ "/source:target:other");
|
|
|
|
|
|
try {
|
|
|
runtime.launchContainer(builder.build());
|
|
@@ -1324,7 +1313,7 @@ public class TestDockerContainerRuntime {
|
|
|
|
|
|
env.put(
|
|
|
DockerLinuxContainerRuntime.ENV_DOCKER_CONTAINER_MOUNTS,
|
|
|
- "s\0ource:target:ro");
|
|
|
+ "/s\0ource:target:ro");
|
|
|
|
|
|
try {
|
|
|
runtime.launchContainer(builder.build());
|
|
@@ -1352,7 +1341,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1369,18 +1358,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/tmp/foo:/tmp/foo:ro,/tmp/bar:/tmp/bar:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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,"
|
|
|
- + "/tmp/foo:/tmp/foo,/tmp/bar:/tmp/bar",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -1420,7 +1408,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(
|
|
|
Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 14;
|
|
|
+ int expected = 13;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -1437,18 +1425,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/tmp/foo:/tmp/foo:rw,/tmp/bar:/tmp/bar:rw",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir,"
|
|
|
- + "/tmp/foo:/tmp/foo,/tmp/bar:/tmp/bar",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter));
|
|
@@ -2005,7 +1992,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files.readAllLines(Paths.get
|
|
|
(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -2022,18 +2009,17 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro,"
|
|
|
+ + "/source/path:/destination/path:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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,"
|
|
|
- + "/source/path:/destination/path",
|
|
|
- dockerCommands.get(counter++));
|
|
|
- Assert.assertEquals(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
|
|
|
// Verify volume-driver is set to expected value.
|
|
@@ -2146,7 +2132,7 @@ public class TestDockerContainerRuntime {
|
|
|
List<String> dockerCommands = Files
|
|
|
.readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8"));
|
|
|
|
|
|
- int expected = 15;
|
|
|
+ int expected = 14;
|
|
|
int counter = 0;
|
|
|
Assert.assertEquals(expected, dockerCommands.size());
|
|
|
Assert.assertEquals("[docker-command-execution]",
|
|
@@ -2165,17 +2151,16 @@ public class TestDockerContainerRuntime {
|
|
|
Assert.assertEquals(
|
|
|
" launch-command=bash,/test_container_work_dir/launch_container.sh",
|
|
|
dockerCommands.get(counter++));
|
|
|
+ Assert.assertEquals(" mounts="
|
|
|
+ + "/test_container_log_dir:/test_container_log_dir:rw,"
|
|
|
+ + "/test_application_local_dir:/test_application_local_dir:rw,"
|
|
|
+ + "/test_filecache_dir:/test_filecache_dir:ro,"
|
|
|
+ + "/test_user_filecache_dir:/test_user_filecache_dir:ro",
|
|
|
+ dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(
|
|
|
" name=container_e11_1518975676334_14532816_01_000001",
|
|
|
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(
|
|
|
- " rw-mounts=/test_container_log_dir:/test_container_log_dir,"
|
|
|
- + "/test_application_local_dir:/test_application_local_dir",
|
|
|
- dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++));
|
|
|
Assert.assertEquals(" workdir=/test_container_work_dir",
|
|
|
dockerCommands.get(counter++));
|