Browse code

Remove deleteAllContainers call in test

Signed-off-by: Antonio Murdaca <me@runcom.ninja>

Antonio Murdaca authored on 2015/04/23 23:32:48
Showing 5 changed files
... ...
@@ -773,7 +773,6 @@ func (s *DockerSuite) TestContainerApiPostCreateNull(c *check.C) {
773 773
 }
774 774
 
775 775
 func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *check.C) {
776
-	defer deleteAllContainers()
777 776
 	config := `{
778 777
 		"Image":     "busybox",
779 778
 		"Cmd":       "ls",
... ...
@@ -795,8 +794,6 @@ func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *check.C) {
795 795
 }
796 796
 
797 797
 func (s *DockerSuite) TestStartWithTooLowMemoryLimit(c *check.C) {
798
-	defer deleteAllContainers()
799
-
800 798
 	out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "create", "busybox"))
801 799
 	if err != nil {
802 800
 		c.Fatal(err, out)
... ...
@@ -2090,7 +2090,6 @@ func (s *DockerSuite) TestBuildRm(c *check.C) {
2090 2090
 		if containerCountBefore == containerCountAfter {
2091 2091
 			c.Fatalf("--rm=false should have left containers behind")
2092 2092
 		}
2093
-		deleteAllContainers()
2094 2093
 		deleteImages(name)
2095 2094
 
2096 2095
 	}
... ...
@@ -14,7 +14,6 @@ import (
14 14
 
15 15
 // Make sure we can create a simple container with some args
16 16
 func (s *DockerSuite) TestCreateArgs(c *check.C) {
17
-
18 17
 	runCmd := exec.Command(dockerBinary, "create", "busybox", "command", "arg1", "arg2", "arg with space")
19 18
 	out, _, _, err := runCommandWithStdoutStderr(runCmd)
20 19
 	if err != nil {
... ...
@@ -256,9 +255,6 @@ func (s *DockerSuite) TestCreateLabels(c *check.C) {
256 256
 	if !reflect.DeepEqual(expected, actual) {
257 257
 		c.Fatalf("Expected %s got %s", expected, actual)
258 258
 	}
259
-
260
-	deleteAllContainers()
261
-
262 259
 }
263 260
 
264 261
 func (s *DockerSuite) TestCreateLabelFromImage(c *check.C) {
... ...
@@ -287,9 +283,6 @@ func (s *DockerSuite) TestCreateLabelFromImage(c *check.C) {
287 287
 	if !reflect.DeepEqual(expected, actual) {
288 288
 		c.Fatalf("Expected %s got %s", expected, actual)
289 289
 	}
290
-
291
-	deleteAllContainers()
292
-
293 290
 }
294 291
 
295 292
 func (s *DockerSuite) TestCreateHostnameWithNumber(c *check.C) {
... ...
@@ -478,9 +478,6 @@ func (s *DockerSuite) TestPsListContainersFilterLabel(c *check.C) {
478 478
 	if (!strings.Contains(containerOut, firstID) || !strings.Contains(containerOut, secondID)) || strings.Contains(containerOut, thirdID) {
479 479
 		c.Fatalf("Expected ids %s,%s, got %s for exited filter, output: %q", firstID, secondID, containerOut, out)
480 480
 	}
481
-
482
-	deleteAllContainers()
483
-
484 481
 }
485 482
 
486 483
 func (s *DockerSuite) TestPsListContainersFilterExited(c *check.C) {
... ...
@@ -1448,7 +1448,6 @@ func (s *DockerSuite) TestRunResolvconfUpdater(c *check.C) {
1448 1448
 
1449 1449
 	//cleanup
1450 1450
 	defer func() {
1451
-		deleteAllContainers()
1452 1451
 		if err := ioutil.WriteFile("/etc/resolv.conf", resolvConfSystem, 0644); err != nil {
1453 1452
 			c.Fatal(err)
1454 1453
 		}
... ...
@@ -2380,7 +2379,6 @@ func (s *DockerSuite) TestRunVolumesNotRecreatedOnStart(c *check.C) {
2380 2380
 	testRequires(c, SameHostDaemon)
2381 2381
 
2382 2382
 	// Clear out any remnants from other tests
2383
-	deleteAllContainers()
2384 2383
 	info, err := ioutil.ReadDir(volumesConfigPath)
2385 2384
 	if err != nil {
2386 2385
 		c.Fatal(err)