diff options
author | Vincent Demeester <vincent@sbr.pm> | 2017-03-23 18:35:22 +0100 |
---|---|---|
committer | Vincent Demeester <vincent@sbr.pm> | 2017-03-23 18:35:22 +0100 |
commit | 50c4475df6304e0cf12ea95217eb00ab5d572e34 (patch) | |
tree | f3c44d3a909511772e0ee592a08b11e69094af34 /integration-cli/docker_api_images_test.go | |
parent | ad530ffee09a4ca6b87a2b009f86b4651653e29a (diff) | |
download | docker-50c4475df6304e0cf12ea95217eb00ab5d572e34.tar.gz |
Introduce a `cli` package for test-integration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat (limited to 'integration-cli/docker_api_images_test.go')
-rw-r--r-- | integration-cli/docker_api_images_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/integration-cli/docker_api_images_test.go b/integration-cli/docker_api_images_test.go index d1b5210c9f..acfe5e1790 100644 --- a/integration-cli/docker_api_images_test.go +++ b/integration-cli/docker_api_images_test.go @@ -9,6 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/image" "github.com/docker/docker/integration-cli/checker" + "github.com/docker/docker/integration-cli/cli" + "github.com/docker/docker/integration-cli/cli/build" "github.com/docker/docker/integration-cli/request" "github.com/go-check/check" ) @@ -53,7 +55,7 @@ func (s *DockerSuite) TestAPIImagesSaveAndLoad(c *check.C) { // TODO Windows to Windows CI: Investigate further why this test fails. testRequires(c, Network) testRequires(c, DaemonIsLinux) - buildImageSuccessfully(c, "saveandload", withDockerfile("FROM busybox\nENV FOO bar")) + buildImageSuccessfully(c, "saveandload", build.WithDockerfile("FROM busybox\nENV FOO bar")) id := getIDByName(c, "saveandload") res, body, err := request.Get("/images/" + id + "/get") @@ -68,7 +70,7 @@ func (s *DockerSuite) TestAPIImagesSaveAndLoad(c *check.C) { defer loadBody.Close() c.Assert(res.StatusCode, checker.Equals, http.StatusOK) - inspectOut := inspectField(c, id, "Id") + inspectOut := cli.InspectCmd(c, id, cli.Format(".Id")).Combined() c.Assert(strings.TrimSpace(string(inspectOut)), checker.Equals, id, check.Commentf("load did not work properly")) } @@ -77,7 +79,7 @@ func (s *DockerSuite) TestAPIImagesDelete(c *check.C) { testRequires(c, Network) } name := "test-api-images-delete" - buildImageSuccessfully(c, name, withDockerfile("FROM busybox\nENV FOO bar")) + buildImageSuccessfully(c, name, build.WithDockerfile("FROM busybox\nENV FOO bar")) id := getIDByName(c, name) dockerCmd(c, "tag", name, "test:tag1") @@ -100,7 +102,7 @@ func (s *DockerSuite) TestAPIImagesHistory(c *check.C) { testRequires(c, Network) } name := "test-api-images-history" - buildImageSuccessfully(c, name, withDockerfile("FROM busybox\nENV FOO bar")) + buildImageSuccessfully(c, name, build.WithDockerfile("FROM busybox\nENV FOO bar")) id := getIDByName(c, name) status, body, err := request.SockRequest("GET", "/images/"+id+"/history", nil, daemonHost()) |