1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Merge pull request #29371 from vdemeester/clean-integration-utils

[test-integration] Clean utils.go from most of its content
This commit is contained in:
Sebastiaan van Stijn
2016-12-29 09:28:46 +01:00
committed by GitHub
23 changed files with 210 additions and 269 deletions

View File

@ -19,6 +19,7 @@ import (
"github.com/docker/docker/builder/dockerfile/command"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/integration"
"github.com/docker/docker/pkg/integration/checker"
icmd "github.com/docker/docker/pkg/integration/cmd"
"github.com/docker/docker/pkg/stringutils"
@ -2085,7 +2086,7 @@ func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
if err != nil {
c.Fatalf("failed to list contents of tmp dir: %s", err)
}
if err = compareDirectoryEntries(entries, entriesFinal); err != nil {
if err = integration.CompareDirectoryEntries(entries, entriesFinal); err != nil {
c.Fatalf("context should have been deleted, but wasn't")
}
@ -2110,7 +2111,7 @@ func (s *DockerSuite) TestBuildContextCleanupFailedBuild(c *check.C) {
if err != nil {
c.Fatalf("failed to list contents of tmp dir: %s", err)
}
if err = compareDirectoryEntries(entries, entriesFinal); err != nil {
if err = integration.CompareDirectoryEntries(entries, entriesFinal); err != nil {
c.Fatalf("context should have been deleted, but wasn't")
}
@ -5341,7 +5342,7 @@ func (s *DockerSuite) TestBuildContainerWithCgroupParent(c *check.C) {
if err != nil {
c.Fatalf("failed to read '/proc/self/cgroup - %v", err)
}
selfCgroupPaths := parseCgroupPaths(string(data))
selfCgroupPaths := integration.ParseCgroupPaths(string(data))
_, found := selfCgroupPaths["memory"]
if !found {
c.Fatalf("unable to find self memory cgroup path. CgroupsPath: %v", selfCgroupPaths)
@ -6242,11 +6243,10 @@ func (s *DockerSuite) TestBuildMultipleTags(c *check.C) {
FROM busybox
MAINTAINER test-15780
`
cmd := exec.Command(dockerBinary, "build", "-t", "tag1", "-t", "tag2:v2",
"-t", "tag1:latest", "-t", "tag1", "--no-cache", "-")
cmd.Stdin = strings.NewReader(dockerfile)
_, err := runCommand(cmd)
c.Assert(err, check.IsNil)
icmd.RunCmd(icmd.Cmd{
Command: []string{dockerBinary, "build", "-t", "tag1", "-t", "tag2:v2", "-t", "tag1:latest", "-t", "tag1", "--no-cache", "-"},
Stdin: strings.NewReader(dockerfile),
}).Assert(c, icmd.Success)
id1, err := getIDByName("tag1")
c.Assert(err, check.IsNil)