Browse code

Removed deleteContainer calls

Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>

Lorenzo Fontana authored on 2015/05/20 15:20:05
Showing 5 changed files
... ...
@@ -31,9 +31,6 @@ func (s *DockerSuite) TestKillContainer(c *check.C) {
31 31
 	if strings.Contains(out, cleanedContainerID) {
32 32
 		c.Fatal("killed container is still running")
33 33
 	}
34
-
35
-	deleteContainer(cleanedContainerID)
36
-
37 34
 }
38 35
 
39 36
 func (s *DockerSuite) TestKillDifferentUserContainer(c *check.C) {
... ...
@@ -60,7 +57,4 @@ func (s *DockerSuite) TestKillDifferentUserContainer(c *check.C) {
60 60
 	if strings.Contains(out, cleanedContainerID) {
61 61
 		c.Fatal("killed container is still running")
62 62
 	}
63
-
64
-	deleteContainer(cleanedContainerID)
65
-
66 63
 }
... ...
@@ -35,9 +35,6 @@ func (s *DockerSuite) TestLogsContainerSmallerThanPage(c *check.C) {
35 35
 	if len(out) != testLen+1 {
36 36
 		c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out))
37 37
 	}
38
-
39
-	deleteContainer(cleanedContainerID)
40
-
41 38
 }
42 39
 
43 40
 // Regression test: When going over the PageSize, it used to panic (gh#4851)
... ...
@@ -61,9 +58,6 @@ func (s *DockerSuite) TestLogsContainerBiggerThanPage(c *check.C) {
61 61
 	if len(out) != testLen+1 {
62 62
 		c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out))
63 63
 	}
64
-
65
-	deleteContainer(cleanedContainerID)
66
-
67 64
 }
68 65
 
69 66
 // 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) {
87 87
 	if len(out) != testLen+1 {
88 88
 		c.Fatalf("Expected log length of %d, received %d\n", testLen+1, len(out))
89 89
 	}
90
-
91
-	deleteContainer(cleanedContainerID)
92
-
93 90
 }
94 91
 
95 92
 func (s *DockerSuite) TestLogsTimestamps(c *check.C) {
... ...
@@ -129,9 +120,6 @@ func (s *DockerSuite) TestLogsTimestamps(c *check.C) {
129 129
 			}
130 130
 		}
131 131
 	}
132
-
133
-	deleteContainer(cleanedContainerID)
134
-
135 132
 }
136 133
 
137 134
 func (s *DockerSuite) TestLogsSeparateStderr(c *check.C) {
... ...
@@ -160,9 +148,6 @@ func (s *DockerSuite) TestLogsSeparateStderr(c *check.C) {
160 160
 	if stderr != msg {
161 161
 		c.Fatalf("Expected %v in stderr stream, got %v", msg, stderr)
162 162
 	}
163
-
164
-	deleteContainer(cleanedContainerID)
165
-
166 163
 }
167 164
 
168 165
 func (s *DockerSuite) TestLogsStderrInStdout(c *check.C) {
... ...
@@ -191,9 +176,6 @@ func (s *DockerSuite) TestLogsStderrInStdout(c *check.C) {
191 191
 	if stdout != msg {
192 192
 		c.Fatalf("Expected %v in stdout stream, got %v", msg, stdout)
193 193
 	}
194
-
195
-	deleteContainer(cleanedContainerID)
196
-
197 194
 }
198 195
 
199 196
 func (s *DockerSuite) TestLogsTail(c *check.C) {
... ...
@@ -243,8 +225,6 @@ func (s *DockerSuite) TestLogsTail(c *check.C) {
243 243
 	if len(lines) != testLen+1 {
244 244
 		c.Fatalf("Expected log %d lines, received %d\n", testLen+1, len(lines))
245 245
 	}
246
-
247
-	deleteContainer(cleanedContainerID)
248 246
 }
249 247
 
250 248
 func (s *DockerSuite) TestLogsFollowStopped(c *check.C) {
... ...
@@ -275,8 +255,6 @@ func (s *DockerSuite) TestLogsFollowStopped(c *check.C) {
275 275
 	case <-time.After(1 * time.Second):
276 276
 		c.Fatal("Following logs is hanged")
277 277
 	}
278
-
279
-	deleteContainer(cleanedContainerID)
280 278
 }
281 279
 
282 280
 func (s *DockerSuite) TestLogsSince(c *check.C) {
... ...
@@ -35,9 +35,6 @@ func (s *DockerSuite) TestRmiWithContainerFails(c *check.C) {
35 35
 	if !strings.Contains(images, "busybox") {
36 36
 		c.Fatalf("The name 'busybox' should not have been removed from images: %q", images)
37 37
 	}
38
-
39
-	deleteContainer(cleanedContainerID)
40
-
41 38
 }
42 39
 
43 40
 func (s *DockerSuite) TestRmiTag(c *check.C) {
... ...
@@ -120,10 +120,6 @@ func (s *DockerSuite) TestRunEchoNamedContainer(c *check.C) {
120 120
 	if out != "test\n" {
121 121
 		c.Errorf("container should've printed 'test'")
122 122
 	}
123
-
124
-	if err := deleteContainer("testfoonamedcontainer"); err != nil {
125
-		c.Errorf("failed to remove the named container: %v", err)
126
-	}
127 123
 }
128 124
 
129 125
 // docker run should not leak file descriptors
... ...
@@ -2534,9 +2530,6 @@ func (s *DockerSuite) TestRunAllowPortRangeThroughExpose(c *check.C) {
2534 2534
 			c.Fatalf("Port is not mapped for the port %d", port)
2535 2535
 		}
2536 2536
 	}
2537
-	if err := deleteContainer(id); err != nil {
2538
-		c.Fatal(err)
2539
-	}
2540 2537
 }
2541 2538
 
2542 2539
 // test docker run expose a invalid port
... ...
@@ -54,8 +54,6 @@ func (s *DockerSuite) TestTopNonPrivileged(c *check.C) {
54 54
 		c.Fatalf("failed to kill container: %s, %v", out, err)
55 55
 	}
56 56
 
57
-	deleteContainer(cleanedContainerID)
58
-
59 57
 	if !strings.Contains(out1, "top") && !strings.Contains(out2, "top") {
60 58
 		c.Fatal("top should've listed `top` in the process list, but failed twice")
61 59
 	} else if !strings.Contains(out1, "top") {
... ...
@@ -92,8 +90,6 @@ func (s *DockerSuite) TestTopPrivileged(c *check.C) {
92 92
 		c.Fatalf("failed to kill container: %s, %v", out, err)
93 93
 	}
94 94
 
95
-	deleteContainer(cleanedContainerID)
96
-
97 95
 	if !strings.Contains(out1, "top") && !strings.Contains(out2, "top") {
98 96
 		c.Fatal("top should've listed `top` in the process list, but failed twice")
99 97
 	} else if !strings.Contains(out1, "top") {