瀏覽代碼

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

LXC needs stdin for container to remain up
Michael Crosby 10 年之前
父節點
當前提交
7b48488c56
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      integration-cli/docker_cli_run_test.go

+ 2 - 2
integration-cli/docker_cli_run_test.go

@@ -316,7 +316,7 @@ func TestRunWithoutNetworking(t *testing.T) {
 
 //test --link use container name to link target
 func TestRunLinksContainerWithContainerName(t *testing.T) {
-	cmd := exec.Command(dockerBinary, "run", "-t", "-d", "--name", "parent", "busybox")
+	cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "--name", "parent", "busybox")
 	out, _, _, err := runCommandWithStdoutStderr(cmd)
 	if err != nil {
 		t.Fatalf("failed to run container: %v, output: %q", err, out)
@@ -342,7 +342,7 @@ func TestRunLinksContainerWithContainerName(t *testing.T) {
 
 //test --link use container id to link target
 func TestRunLinksContainerWithContainerId(t *testing.T) {
-	cmd := exec.Command(dockerBinary, "run", "-t", "-d", "busybox")
+	cmd := exec.Command(dockerBinary, "run", "-i", "-t", "-d", "busybox")
 	cID, _, _, err := runCommandWithStdoutStderr(cmd)
 	if err != nil {
 		t.Fatalf("failed to run container: %v, output: %q", err, cID)