summaryrefslogtreecommitdiff
path: root/integration-cli/docker_api_images_test.go
diff options
context:
space:
mode:
authorVincent Demeester <vincent@sbr.pm>2017-03-06 16:35:27 +0100
committerVincent Demeester <vincent@sbr.pm>2017-03-06 16:41:33 +0100
commitb11ba1231ef0ac99279ed5dcd76d81413d7d63b5 (patch)
treeb240c577f8828dda3d98caefa3268ab43317cd08 /integration-cli/docker_api_images_test.go
parent3cfc3e30a886aef1a5e767d5b2a9a7b2c156c5f9 (diff)
downloaddocker-b11ba1231ef0ac99279ed5dcd76d81413d7d63b5.tar.gz
Update request.* signature to remove the host
99.9% of use case for request call are using daemonHost. This makes it default and adds a `request.DoOnHost` function to be able to specify the host for specific, more complex use cases. 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.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integration-cli/docker_api_images_test.go b/integration-cli/docker_api_images_test.go
index 2e47ab6232..d1b5210c9f 100644
--- a/integration-cli/docker_api_images_test.go
+++ b/integration-cli/docker_api_images_test.go
@@ -56,14 +56,14 @@ func (s *DockerSuite) TestAPIImagesSaveAndLoad(c *check.C) {
buildImageSuccessfully(c, "saveandload", withDockerfile("FROM busybox\nENV FOO bar"))
id := getIDByName(c, "saveandload")
- res, body, err := request.Get(daemonHost(), "/images/"+id+"/get")
+ res, body, err := request.Get("/images/" + id + "/get")
c.Assert(err, checker.IsNil)
defer body.Close()
c.Assert(res.StatusCode, checker.Equals, http.StatusOK)
dockerCmd(c, "rmi", id)
- res, loadBody, err := request.Post(daemonHost(), "/images/load", request.RawContent(body), request.ContentType("application/x-tar"))
+ res, loadBody, err := request.Post("/images/load", request.RawContent(body), request.ContentType("application/x-tar"))
c.Assert(err, checker.IsNil)
defer loadBody.Close()
c.Assert(res.StatusCode, checker.Equals, http.StatusOK)
@@ -119,7 +119,7 @@ func (s *DockerSuite) TestAPIImagesHistory(c *check.C) {
func (s *DockerSuite) TestAPIImagesSearchJSONContentType(c *check.C) {
testRequires(c, Network)
- res, b, err := request.Get(daemonHost(), "/images/search?term=test", request.JSON)
+ res, b, err := request.Get("/images/search?term=test", request.JSON)
c.Assert(err, check.IsNil)
b.Close()
c.Assert(res.StatusCode, checker.Equals, http.StatusOK)