summaryrefslogtreecommitdiff
path: root/integration-cli/docker_api_images_test.go
diff options
context:
space:
mode:
authorDaniel Nephin <dnephin@docker.com>2017-09-19 16:12:29 -0400
committerDaniel Nephin <dnephin@docker.com>2018-02-20 17:27:24 -0500
commit0a91ba2d8cfe16df0ba37c1e283c8e3dbbb086d4 (patch)
tree59032a04296094e80682b71c3d3866b13456785d /integration-cli/docker_api_images_test.go
parenta68ae4a2d95b1ff143025a435195af0f1ab30ace (diff)
downloaddocker-0a91ba2d8cfe16df0ba37c1e283c8e3dbbb086d4.tar.gz
Remove duplicate calls for getting an APIClient
Remove request.SockRequest Remove request.SockRequestHijack Remove request.SockRequestRaw() Remove deprecated ParseHost Deprecate and unexport more helpers Signed-off-by: Daniel Nephin <dnephin@docker.com>
Diffstat (limited to 'integration-cli/docker_api_images_test.go')
-rw-r--r--integration-cli/docker_api_images_test.go24
1 files changed, 6 insertions, 18 deletions
diff --git a/integration-cli/docker_api_images_test.go b/integration-cli/docker_api_images_test.go
index a5628e41b9..7c6c235354 100644
--- a/integration-cli/docker_api_images_test.go
+++ b/integration-cli/docker_api_images_test.go
@@ -157,33 +157,21 @@ func (s *DockerSuite) TestAPIImagesSearchJSONContentType(c *check.C) {
// Test case for 30027: image size reported as -1 in v1.12 client against v1.13 daemon.
// This test checks to make sure both v1.12 and v1.13 client against v1.13 daemon get correct `Size` after the fix.
func (s *DockerSuite) TestAPIImagesSizeCompatibility(c *check.C) {
- cli, err := client.NewEnvClient()
- c.Assert(err, checker.IsNil)
- defer cli.Close()
+ apiclient := testEnv.APIClient()
+ defer apiclient.Close()
- images, err := cli.ImageList(context.Background(), types.ImageListOptions{})
+ images, err := apiclient.ImageList(context.Background(), types.ImageListOptions{})
c.Assert(err, checker.IsNil)
c.Assert(len(images), checker.Not(checker.Equals), 0)
for _, image := range images {
c.Assert(image.Size, checker.Not(checker.Equals), int64(-1))
}
- type v124Image struct {
- ID string `json:"Id"`
- ParentID string `json:"ParentId"`
- RepoTags []string
- RepoDigests []string
- Created int64
- Size int64
- VirtualSize int64
- Labels map[string]string
- }
-
- cli, err = client.NewClientWithOpts(client.FromEnv, client.WithVersion("v1.24"))
+ apiclient, err = client.NewClientWithOpts(client.FromEnv, client.WithVersion("v1.24"))
c.Assert(err, checker.IsNil)
- defer cli.Close()
+ defer apiclient.Close()
- v124Images, err := cli.ImageList(context.Background(), types.ImageListOptions{})
+ v124Images, err := apiclient.ImageList(context.Background(), types.ImageListOptions{})
c.Assert(err, checker.IsNil)
c.Assert(len(v124Images), checker.Not(checker.Equals), 0)
for _, image := range v124Images {