mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Clean some function in docker_utils_test.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@ -20,6 +20,7 @@ import (
|
||||
"github.com/docker/docker/integration-cli/request"
|
||||
icmd "github.com/docker/docker/pkg/testutil/cmd"
|
||||
"github.com/go-check/check"
|
||||
"github.com/docker/docker/integration-cli/cli"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestExec(c *check.C) {
|
||||
@ -137,7 +138,6 @@ func (s *DockerSuite) TestExecExitStatus(c *check.C) {
|
||||
|
||||
func (s *DockerSuite) TestExecPausedContainer(c *check.C) {
|
||||
testRequires(c, IsPausable)
|
||||
defer unpauseAllContainers(c)
|
||||
|
||||
out, _ := runSleepingContainer(c, "-d", "--name", "testing")
|
||||
ContainerID := strings.TrimSpace(out)
|
||||
@ -389,7 +389,10 @@ func (s *DockerSuite) TestRunMutableNetworkFiles(c *check.C) {
|
||||
// Not applicable on Windows to Windows CI.
|
||||
testRequires(c, SameHostDaemon, DaemonIsLinux)
|
||||
for _, fn := range []string{"resolv.conf", "hosts"} {
|
||||
deleteAllContainers(c)
|
||||
containers := cli.DockerCmd(c, "ps", "-q", "-a").Combined()
|
||||
if containers != "" {
|
||||
cli.DockerCmd(c, append([]string{"rm", "-fv"}, strings.Split(strings.TrimSpace(containers), "\n")...)...)
|
||||
}
|
||||
|
||||
content := runCommandAndReadContainerFile(c, fn, dockerBinary, "run", "-d", "--name", "c1", "busybox", "sh", "-c", fmt.Sprintf("echo success >/etc/%s && top", fn))
|
||||
|
||||
|
Reference in New Issue
Block a user