From 086b514f6afb1eacc0683baa3472c80022f6e7e2 Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana Date: Wed, 20 May 2015 08:20:05 +0200 Subject: [PATCH] Removed deleteContainer calls Signed-off-by: Lorenzo Fontana --- integration-cli/docker_cli_kill_test.go | 6 ------ integration-cli/docker_cli_logs_test.go | 22 ---------------------- integration-cli/docker_cli_rmi_test.go | 3 --- integration-cli/docker_cli_run_test.go | 7 ------- integration-cli/docker_cli_top_test.go | 4 ---- 5 files changed, 42 deletions(-) diff --git a/integration-cli/docker_cli_kill_test.go b/integration-cli/docker_cli_kill_test.go index 68685efb92..1371a0be08 100644 --- a/integration-cli/docker_cli_kill_test.go +++ b/integration-cli/docker_cli_kill_test.go @@ -31,9 +31,6 @@ func (s *DockerSuite) TestKillContainer(c *check.C) { if strings.Contains(out, cleanedContainerID) { c.Fatal("killed container is still running") } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestKillDifferentUserContainer(c *check.C) { @@ -60,7 +57,4 @@ func (s *DockerSuite) TestKillDifferentUserContainer(c *check.C) { if strings.Contains(out, cleanedContainerID) { c.Fatal("killed container is still running") } - - deleteContainer(cleanedContainerID) - } diff --git a/integration-cli/docker_cli_logs_test.go b/integration-cli/docker_cli_logs_test.go index 7747335132..2f23606e32 100644 --- a/integration-cli/docker_cli_logs_test.go +++ b/integration-cli/docker_cli_logs_test.go @@ -35,9 +35,6 @@ func (s *DockerSuite) TestLogsContainerSmallerThanPage(c *check.C) { if len(out) != testLen+1 { c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out)) } - - deleteContainer(cleanedContainerID) - } // Regression test: When going over the PageSize, it used to panic (gh#4851) @@ -61,9 +58,6 @@ func (s *DockerSuite) TestLogsContainerBiggerThanPage(c *check.C) { if len(out) != testLen+1 { c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out)) } - - deleteContainer(cleanedContainerID) - } // Regression test: When going much over the PageSize, it used to block (gh#4851) @@ -87,9 +81,6 @@ func (s *DockerSuite) TestLogsContainerMuchBiggerThanPage(c *check.C) { if len(out) != testLen+1 { c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out)) } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestLogsTimestamps(c *check.C) { @@ -129,9 +120,6 @@ func (s *DockerSuite) TestLogsTimestamps(c *check.C) { } } } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestLogsSeparateStderr(c *check.C) { @@ -160,9 +148,6 @@ func (s *DockerSuite) TestLogsSeparateStderr(c *check.C) { if stderr != msg { c.Fatalf("Expected %v in stderr stream, got %v", msg, stderr) } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestLogsStderrInStdout(c *check.C) { @@ -191,9 +176,6 @@ func (s *DockerSuite) TestLogsStderrInStdout(c *check.C) { if stdout != msg { c.Fatalf("Expected %v in stdout stream, got %v", msg, stdout) } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestLogsTail(c *check.C) { @@ -243,8 +225,6 @@ func (s *DockerSuite) TestLogsTail(c *check.C) { if len(lines) != testLen+1 { c.Fatalf("Expected log %d lines, received %d\n", testLen+1, len(lines)) } - - deleteContainer(cleanedContainerID) } func (s *DockerSuite) TestLogsFollowStopped(c *check.C) { @@ -275,8 +255,6 @@ func (s *DockerSuite) TestLogsFollowStopped(c *check.C) { case <-time.After(1 * time.Second): c.Fatal("Following logs is hanged") } - - deleteContainer(cleanedContainerID) } func (s *DockerSuite) TestLogsSince(c *check.C) { diff --git a/integration-cli/docker_cli_rmi_test.go b/integration-cli/docker_cli_rmi_test.go index fa82916f2b..c7d0ca8047 100644 --- a/integration-cli/docker_cli_rmi_test.go +++ b/integration-cli/docker_cli_rmi_test.go @@ -35,9 +35,6 @@ func (s *DockerSuite) TestRmiWithContainerFails(c *check.C) { if !strings.Contains(images, "busybox") { c.Fatalf("The name 'busybox' should not have been removed from images: %q", images) } - - deleteContainer(cleanedContainerID) - } func (s *DockerSuite) TestRmiTag(c *check.C) { diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index bfb50e418e..e9c1e0b9b5 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -120,10 +120,6 @@ func (s *DockerSuite) TestRunEchoNamedContainer(c *check.C) { if out != "test\n" { c.Errorf("container should've printed 'test'") } - - if err := deleteContainer("testfoonamedcontainer"); err != nil { - c.Errorf("failed to remove the named container: %v", err) - } } // docker run should not leak file descriptors @@ -2534,9 +2530,6 @@ func (s *DockerSuite) TestRunAllowPortRangeThroughExpose(c *check.C) { c.Fatalf("Port is not mapped for the port %d", port) } } - if err := deleteContainer(id); err != nil { - c.Fatal(err) - } } // test docker run expose a invalid port diff --git a/integration-cli/docker_cli_top_test.go b/integration-cli/docker_cli_top_test.go index f941a42cd0..f28e20ba33 100644 --- a/integration-cli/docker_cli_top_test.go +++ b/integration-cli/docker_cli_top_test.go @@ -54,8 +54,6 @@ func (s *DockerSuite) TestTopNonPrivileged(c *check.C) { c.Fatalf("failed to kill container: %s, %v", out, err) } - deleteContainer(cleanedContainerID) - if !strings.Contains(out1, "top") && !strings.Contains(out2, "top") { c.Fatal("top should've listed `top` in the process list, but failed twice") } else if !strings.Contains(out1, "top") { @@ -92,8 +90,6 @@ func (s *DockerSuite) TestTopPrivileged(c *check.C) { c.Fatalf("failed to kill container: %s, %v", out, err) } - deleteContainer(cleanedContainerID) - if !strings.Contains(out1, "top") && !strings.Contains(out2, "top") { c.Fatal("top should've listed `top` in the process list, but failed twice") } else if !strings.Contains(out1, "top") {