Browse code

Merge pull request #10190 from ashahab-altiscale/9875-lxc-run-links

LXC needs stdin for container to remain up

Michael Crosby authored on 2015/01/20 10:13:37
Showing 1 changed files
... ...
@@ -316,7 +316,7 @@ func TestRunWithoutNetworking(t *testing.T) {
316 316
 
317 317
 //test --link use container name to link target
318 318
 func TestRunLinksContainerWithContainerName(t *testing.T) {
319
-	cmd := exec.Command(dockerBinary, "run", "-t", "-d", "--name", "parent", "busybox")
319
+	cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "--name", "parent", "busybox")
320 320
 	out, _, _, err := runCommandWithStdoutStderr(cmd)
321 321
 	if err != nil {
322 322
 		t.Fatalf("failed to run container: %v, output: %q", err, out)
... ...
@@ -342,7 +342,7 @@ func TestRunLinksContainerWithContainerName(t *testing.T) {
342 342
 
343 343
 //test --link use container id to link target
344 344
 func TestRunLinksContainerWithContainerId(t *testing.T) {
345
-	cmd := exec.Command(dockerBinary, "run", "-t", "-d", "busybox")
345
+	cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "busybox")
346 346
 	cID, _, _, err := runCommandWithStdoutStderr(cmd)
347 347
 	if err != nil {
348 348
 		t.Fatalf("failed to run container: %v, output: %q", err, cID)