summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Demeester <vincent@sbr.pm>2015-04-23 22:27:46 +0200
committerVincent Demeester <vincent@sbr.pm>2015-04-23 22:27:46 +0200
commitc5ef2901d8190b687e847ab17d306dae5af37b42 (patch)
tree9a5b9566fbdfa9dbb0255e355ffa0b32229820fd
parentc4914f071ffad203bc4ed16404f7ddc985a5f63e (diff)
downloaddocker-c5ef2901d8190b687e847ab17d306dae5af37b42.tar.gz
delete "defer deleteContainer" on tests
Since docker test suite is now using gocheck, ``defer deleteContainer(…)`` is not needed anymore. Fixes #12705 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
-rw-r--r--integration-cli/docker_cli_by_digest_test.go2
-rw-r--r--integration-cli/docker_cli_cp_test.go10
-rw-r--r--integration-cli/docker_cli_export_import_test.go2
-rw-r--r--integration-cli/docker_cli_history_test.go1
-rw-r--r--integration-cli/docker_cli_import_test.go1
-rw-r--r--integration-cli/docker_cli_logs_test.go1
-rw-r--r--integration-cli/docker_cli_save_load_test.go2
-rw-r--r--integration-cli/docker_cli_top_test.go1
8 files changed, 0 insertions, 20 deletions
diff --git a/integration-cli/docker_cli_by_digest_test.go b/integration-cli/docker_cli_by_digest_test.go
index fc8c4600b9..bd45184341 100644
--- a/integration-cli/docker_cli_by_digest_test.go
+++ b/integration-cli/docker_cli_by_digest_test.go
@@ -140,7 +140,6 @@ func (s *DockerSuite) TestCreateByDigest(c *check.C) {
if err != nil {
c.Fatalf("error creating by digest: %s, %v", out, err)
}
- defer deleteContainer(containerName)
res, err := inspectField(containerName, "Config.Image")
if err != nil {
@@ -168,7 +167,6 @@ func (s *DockerSuite) TestRunByDigest(c *check.C) {
if err != nil {
c.Fatalf("error run by digest: %s, %v", out, err)
}
- defer deleteContainer(containerName)
foundRegex := regexp.MustCompile("found=([^\n]+)")
matches := foundRegex.FindStringSubmatch(out)
diff --git a/integration-cli/docker_cli_cp_test.go b/integration-cli/docker_cli_cp_test.go
index 022b3cc9ea..26e778e4f2 100644
--- a/integration-cli/docker_cli_cp_test.go
+++ b/integration-cli/docker_cli_cp_test.go
@@ -32,7 +32,6 @@ func (s *DockerSuite) TestCpGarbagePath(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -90,7 +89,6 @@ func (s *DockerSuite) TestCpRelativePath(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -156,7 +154,6 @@ func (s *DockerSuite) TestCpAbsolutePath(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -216,7 +213,6 @@ func (s *DockerSuite) TestCpAbsoluteSymlink(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -276,7 +272,6 @@ func (s *DockerSuite) TestCpSymlinkComponent(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -337,7 +332,6 @@ func (s *DockerSuite) TestCpUnprivilegedUser(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -379,7 +373,6 @@ func (s *DockerSuite) TestCpSpecialFiles(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -525,7 +518,6 @@ func (s *DockerSuite) TestCpToDot(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
@@ -559,7 +551,6 @@ func (s *DockerSuite) TestCpToStdout(c *check.C) {
}
cID := strings.TrimSpace(out)
- defer deleteContainer(cID)
out, _ = dockerCmd(c, "wait", cID)
if strings.TrimSpace(out) != "0" {
@@ -588,7 +579,6 @@ func (s *DockerSuite) TestCpNameHasColon(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _ = dockerCmd(c, "wait", cleanedContainerID)
if strings.TrimSpace(out) != "0" {
diff --git a/integration-cli/docker_cli_export_import_test.go b/integration-cli/docker_cli_export_import_test.go
index 59a5106303..bc7b16356d 100644
--- a/integration-cli/docker_cli_export_import_test.go
+++ b/integration-cli/docker_cli_export_import_test.go
@@ -13,7 +13,6 @@ func (s *DockerSuite) TestExportContainerAndImportImage(c *check.C) {
containerID := "testexportcontainerandimportimage"
defer deleteImages("repo/testexp:v1")
- defer deleteContainer(containerID)
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", containerID, "busybox", "true")
out, _, err := runCommandWithOutput(runCmd)
@@ -53,7 +52,6 @@ func (s *DockerSuite) TestExportContainerWithOutputAndImportImage(c *check.C) {
containerID := "testexportcontainerwithoutputandimportimage"
defer deleteImages("repo/testexp:v1")
- defer deleteContainer(containerID)
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", containerID, "busybox", "true")
out, _, err := runCommandWithOutput(runCmd)
diff --git a/integration-cli/docker_cli_history_test.go b/integration-cli/docker_cli_history_test.go
index 134f7bc7f8..8de4008314 100644
--- a/integration-cli/docker_cli_history_test.go
+++ b/integration-cli/docker_cli_history_test.go
@@ -85,7 +85,6 @@ func (s *DockerSuite) TestHistoryNonExistentImage(c *check.C) {
func (s *DockerSuite) TestHistoryImageWithComment(c *check.C) {
name := "testhistoryimagewithcomment"
- defer deleteContainer(name)
defer deleteImages(name)
// make a image through docker commit <container id> [ -m messages ]
diff --git a/integration-cli/docker_cli_import_test.go b/integration-cli/docker_cli_import_test.go
index dd06ef8222..02b857bfd9 100644
--- a/integration-cli/docker_cli_import_test.go
+++ b/integration-cli/docker_cli_import_test.go
@@ -14,7 +14,6 @@ func (s *DockerSuite) TestImportDisplay(c *check.C) {
c.Fatal("failed to create a container", out, err)
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
out, _, err = runCommandPipelineWithOutput(
exec.Command(dockerBinary, "export", cleanedContainerID),
diff --git a/integration-cli/docker_cli_logs_test.go b/integration-cli/docker_cli_logs_test.go
index 7f04a328b7..a7c8916226 100644
--- a/integration-cli/docker_cli_logs_test.go
+++ b/integration-cli/docker_cli_logs_test.go
@@ -287,7 +287,6 @@ func (s *DockerSuite) TestLogsFollowSlowStdoutConsumer(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
stopSlowRead := make(chan bool)
diff --git a/integration-cli/docker_cli_save_load_test.go b/integration-cli/docker_cli_save_load_test.go
index ead436a925..f74f69fcc1 100644
--- a/integration-cli/docker_cli_save_load_test.go
+++ b/integration-cli/docker_cli_save_load_test.go
@@ -216,7 +216,6 @@ func (s *DockerSuite) TestSaveAndLoadRepoFlags(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
repoName := "foobar-save-load-test"
@@ -298,7 +297,6 @@ func (s *DockerSuite) TestSaveRepoWithMultipleImages(c *check.C) {
c.Fatalf("failed to create a container: %v %v", out, err)
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
commitCmd := exec.Command(dockerBinary, "commit", cleanedContainerID, tag)
if out, _, err = runCommandWithOutput(commitCmd); err != nil {
diff --git a/integration-cli/docker_cli_top_test.go b/integration-cli/docker_cli_top_test.go
index 7e75a38d57..f941a42cd0 100644
--- a/integration-cli/docker_cli_top_test.go
+++ b/integration-cli/docker_cli_top_test.go
@@ -15,7 +15,6 @@ func (s *DockerSuite) TestTopMultipleArgs(c *check.C) {
}
cleanedContainerID := strings.TrimSpace(out)
- defer deleteContainer(cleanedContainerID)
topCmd := exec.Command(dockerBinary, "top", cleanedContainerID, "-o", "pid")
out, _, err = runCommandWithOutput(topCmd)