1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Delete "defer deleteAllContainers()" from integration-cli

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei 2015-05-22 17:01:52 +08:00
parent 23e8dff9e7
commit 6809fa6861
3 changed files with 0 additions and 10 deletions

View file

@ -63,7 +63,6 @@ func (s *DockerSuite) TestLogsApiNoStdoutNorStderr(c *check.C) {
// Regression test for #12704 // Regression test for #12704
func (s *DockerSuite) TestLogsApiFollowEmptyOutput(c *check.C) { func (s *DockerSuite) TestLogsApiFollowEmptyOutput(c *check.C) {
defer deleteAllContainers()
name := "logs_test" name := "logs_test"
t0 := time.Now() t0 := time.Now()
runCmd := exec.Command(dockerBinary, "run", "-d", "-t", "--name", name, "busybox", "sleep", "10") runCmd := exec.Command(dockerBinary, "run", "-d", "-t", "--name", name, "busybox", "sleep", "10")

View file

@ -60,7 +60,6 @@ func getContainerStatus(c *check.C, containerID string) string {
func (s *DockerSuite) TestNetworkNat(c *check.C) { func (s *DockerSuite) TestNetworkNat(c *check.C) {
testRequires(c, SameHostDaemon, NativeExecDriver) testRequires(c, SameHostDaemon, NativeExecDriver)
defer deleteAllContainers()
srv := startServerContainer(c, "tcp", 8080) srv := startServerContainer(c, "tcp", 8080)
@ -86,7 +85,6 @@ func (s *DockerSuite) TestNetworkNat(c *check.C) {
func (s *DockerSuite) TestNetworkLocalhostTCPNat(c *check.C) { func (s *DockerSuite) TestNetworkLocalhostTCPNat(c *check.C) {
testRequires(c, SameHostDaemon, NativeExecDriver) testRequires(c, SameHostDaemon, NativeExecDriver)
defer deleteAllContainers()
srv := startServerContainer(c, "tcp", 8081) srv := startServerContainer(c, "tcp", 8081)

View file

@ -2732,7 +2732,6 @@ func (s *DockerSuite) TestRunModePidHost(c *check.C) {
func (s *DockerSuite) TestRunModeUTSHost(c *check.C) { func (s *DockerSuite) TestRunModeUTSHost(c *check.C) {
testRequires(c, NativeExecDriver, SameHostDaemon) testRequires(c, NativeExecDriver, SameHostDaemon)
defer deleteAllContainers()
hostUTS, err := os.Readlink("/proc/1/ns/uts") hostUTS, err := os.Readlink("/proc/1/ns/uts")
if err != nil { if err != nil {
@ -3141,7 +3140,6 @@ func (s *DockerSuite) TestRunPidHostWithChildIsKillable(c *check.C) {
} }
func (s *DockerSuite) TestRunWithTooSmallMemoryLimit(c *check.C) { func (s *DockerSuite) TestRunWithTooSmallMemoryLimit(c *check.C) {
defer deleteAllContainers()
// this memory limit is 1 byte less than the min, which is 4MB // this memory limit is 1 byte less than the min, which is 4MB
// https://github.com/docker/docker/blob/v1.5.0/daemon/create.go#L22 // https://github.com/docker/docker/blob/v1.5.0/daemon/create.go#L22
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-m", "4194303", "busybox")) out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-m", "4194303", "busybox"))
@ -3151,7 +3149,6 @@ func (s *DockerSuite) TestRunWithTooSmallMemoryLimit(c *check.C) {
} }
func (s *DockerSuite) TestRunWriteToProcAsound(c *check.C) { func (s *DockerSuite) TestRunWriteToProcAsound(c *check.C) {
defer deleteAllContainers()
code, err := runCommand(exec.Command(dockerBinary, "run", "busybox", "sh", "-c", "echo 111 >> /proc/asound/version")) code, err := runCommand(exec.Command(dockerBinary, "run", "busybox", "sh", "-c", "echo 111 >> /proc/asound/version"))
if err == nil || code == 0 { if err == nil || code == 0 {
c.Fatal("standard container should not be able to write to /proc/asound") c.Fatal("standard container should not be able to write to /proc/asound")
@ -3160,7 +3157,6 @@ func (s *DockerSuite) TestRunWriteToProcAsound(c *check.C) {
func (s *DockerSuite) TestRunReadProcTimer(c *check.C) { func (s *DockerSuite) TestRunReadProcTimer(c *check.C) {
testRequires(c, NativeExecDriver) testRequires(c, NativeExecDriver)
defer deleteAllContainers()
out, code, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "busybox", "cat", "/proc/timer_stats")) out, code, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "busybox", "cat", "/proc/timer_stats"))
if err != nil || code != 0 { if err != nil || code != 0 {
c.Fatal(err) c.Fatal(err)
@ -3178,7 +3174,6 @@ func (s *DockerSuite) TestRunReadProcLatency(c *check.C) {
c.Skip("kernel doesnt have latency_stats configured") c.Skip("kernel doesnt have latency_stats configured")
return return
} }
defer deleteAllContainers()
out, code, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "busybox", "cat", "/proc/latency_stats")) out, code, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "busybox", "cat", "/proc/latency_stats"))
if err != nil || code != 0 { if err != nil || code != 0 {
c.Fatal(err) c.Fatal(err)
@ -3190,7 +3185,6 @@ func (s *DockerSuite) TestRunReadProcLatency(c *check.C) {
func (s *DockerSuite) TestMountIntoProc(c *check.C) { func (s *DockerSuite) TestMountIntoProc(c *check.C) {
testRequires(c, NativeExecDriver) testRequires(c, NativeExecDriver)
defer deleteAllContainers()
code, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/proc//sys", "busybox", "true")) code, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/proc//sys", "busybox", "true"))
if err == nil || code == 0 { if err == nil || code == 0 {
c.Fatal("container should not be able to mount into /proc") c.Fatal("container should not be able to mount into /proc")
@ -3199,7 +3193,6 @@ func (s *DockerSuite) TestMountIntoProc(c *check.C) {
func (s *DockerSuite) TestMountIntoSys(c *check.C) { func (s *DockerSuite) TestMountIntoSys(c *check.C) {
testRequires(c, NativeExecDriver) testRequires(c, NativeExecDriver)
defer deleteAllContainers()
_, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/fs/cgroup", "busybox", "true")) _, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/fs/cgroup", "busybox", "true"))
if err != nil { if err != nil {
c.Fatal("container should be able to mount into /sys/fs/cgroup") c.Fatal("container should be able to mount into /sys/fs/cgroup")