diff options
author | Vincent Demeester <vincent@sbr.pm> | 2016-12-30 18:23:00 +0100 |
---|---|---|
committer | Vincent Demeester <vincent@sbr.pm> | 2016-12-30 18:26:34 +0100 |
commit | 33968e6c7df164fff0a882c50ae7f4f7e6190e4b (patch) | |
tree | 582c9ef712a844a31465b695bc0d1ae8872909b0 /integration-cli/docker_cli_save_load_test.go | |
parent | 5374d53322abd6a5b2ebb34b7422abc26d1b5eb3 (diff) | |
download | docker-33968e6c7df164fff0a882c50ae7f4f7e6190e4b.tar.gz |
Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat (limited to 'integration-cli/docker_cli_save_load_test.go')
-rw-r--r-- | integration-cli/docker_cli_save_load_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/integration-cli/docker_cli_save_load_test.go b/integration-cli/docker_cli_save_load_test.go index 5be695948c..b7d82f74d2 100644 --- a/integration-cli/docker_cli_save_load_test.go +++ b/integration-cli/docker_cli_save_load_test.go @@ -14,8 +14,8 @@ import ( "time" "github.com/docker/distribution/digest" - "github.com/docker/docker/pkg/integration" - "github.com/docker/docker/pkg/integration/checker" + "github.com/docker/docker/integration-cli/checker" + "github.com/docker/docker/pkg/testutil" "github.com/go-check/check" ) @@ -30,7 +30,7 @@ func (s *DockerSuite) TestSaveXzAndLoadRepoStdout(c *check.C) { dockerCmd(c, "inspect", repoName) - repoTarball, _, err := integration.RunCommandPipelineWithOutput( + repoTarball, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", repoName), exec.Command("xz", "-c"), exec.Command("gzip", "-c")) @@ -57,7 +57,7 @@ func (s *DockerSuite) TestSaveXzGzAndLoadRepoStdout(c *check.C) { dockerCmd(c, "inspect", repoName) - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", repoName), exec.Command("xz", "-c"), exec.Command("gzip", "-c")) @@ -82,7 +82,7 @@ func (s *DockerSuite) TestSaveSingleTag(c *check.C) { out, _ := dockerCmd(c, "images", "-q", "--no-trunc", repoName) cleanedImageID := strings.TrimSpace(out) - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", fmt.Sprintf("%v:latest", repoName)), exec.Command("tar", "t"), exec.Command("grep", "-E", fmt.Sprintf("(^repositories$|%v)", cleanedImageID))) @@ -101,7 +101,7 @@ func (s *DockerSuite) TestSaveCheckTimes(c *check.C) { c.Assert(err, checker.IsNil, check.Commentf("failed to marshal from %q: err %v", repoName, err)) c.Assert(len(data), checker.Not(checker.Equals), 0, check.Commentf("failed to marshal the data from %q", repoName)) tarTvTimeFormat := "2006-01-02 15:04" - out, _, err = integration.RunCommandPipelineWithOutput( + out, _, err = testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", repoName), exec.Command("tar", "tv"), exec.Command("grep", "-E", fmt.Sprintf("%s %s", data[0].Created.Format(tarTvTimeFormat), digest.Digest(data[0].ID).Hex()))) @@ -159,7 +159,7 @@ func (s *DockerSuite) TestSaveAndLoadRepoFlags(c *check.C) { before, _ := dockerCmd(c, "inspect", repoName) - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", repoName), exec.Command(dockerBinary, "load")) c.Assert(err, checker.IsNil, check.Commentf("failed to save and load repo: %s, %v", out, err)) @@ -188,7 +188,7 @@ func (s *DockerSuite) TestSaveMultipleNames(c *check.C) { // Make two images dockerCmd(c, "tag", "emptyfs:latest", fmt.Sprintf("%v-two:latest", repoName)) - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", fmt.Sprintf("%v-one", repoName), fmt.Sprintf("%v-two:latest", repoName)), exec.Command("tar", "xO", "repositories"), exec.Command("grep", "-q", "-E", "(-one|-two)"), @@ -220,7 +220,7 @@ func (s *DockerSuite) TestSaveRepoWithMultipleImages(c *check.C) { deleteImages(repoName) // create the archive - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", repoName, "busybox:latest"), exec.Command("tar", "t")) c.Assert(err, checker.IsNil, check.Commentf("failed to save multiple images: %s, %v", out, err)) @@ -267,7 +267,7 @@ func (s *DockerSuite) TestSaveDirectoryPermissions(c *check.C) { true) c.Assert(err, checker.IsNil, check.Commentf("%v", err)) - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", name), exec.Command("tar", "-xf", "-", "-C", extractionDirectory), ) @@ -286,7 +286,7 @@ func (s *DockerSuite) TestSaveDirectoryPermissions(c *check.C) { c.Assert(err, checker.IsNil, check.Commentf("failed to open %s: %s", layerPath, err)) defer f.Close() - entries, err := integration.ListTar(f) + entries, err := testutil.ListTar(f) for _, e := range entries { if !strings.Contains(e, "dev/") { entriesSansDev = append(entriesSansDev, e) @@ -364,7 +364,7 @@ func (s *DockerSuite) TestSaveLoadNoTag(c *check.C) { id := inspectField(c, name, "Id") // Test to make sure that save w/o name just shows imageID during load - out, _, err := integration.RunCommandPipelineWithOutput( + out, _, err := testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", id), exec.Command(dockerBinary, "load")) c.Assert(err, checker.IsNil, check.Commentf("failed to save and load repo: %s, %v", out, err)) @@ -375,7 +375,7 @@ func (s *DockerSuite) TestSaveLoadNoTag(c *check.C) { c.Assert(out, checker.Contains, id) // Test to make sure that save by name shows that name during load - out, _, err = integration.RunCommandPipelineWithOutput( + out, _, err = testutil.RunCommandPipelineWithOutput( exec.Command(dockerBinary, "save", name), exec.Command(dockerBinary, "load")) c.Assert(err, checker.IsNil, check.Commentf("failed to save and load repo: %s, %v", out, err)) |