summaryrefslogtreecommitdiff
path: root/integration-cli/docker_api_attach_test.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2023-04-03 13:00:29 +0200
committerSebastiaan van Stijn <github@gone.nl>2023-04-03 20:01:05 +0200
commit3beda177737efe2ca359fe9a03dfc2b13a0a4d24 (patch)
treecb8fc41af067a3b5fbd2ad27bd8bdf86e657fa3d /integration-cli/docker_api_attach_test.go
parent781740c19d497252b487efc2f1c3deade99705ab (diff)
downloaddocker-3beda177737efe2ca359fe9a03dfc2b13a0a4d24.tar.gz
integration-cli: rename vars that collided with imports
- use apiClient for api-clients to reduce shadowing (also more "accurate") - use "ctr" instead of "container" Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'integration-cli/docker_api_attach_test.go')
-rw-r--r--integration-cli/docker_api_attach_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
index defd44492d..6d31c51ec3 100644
--- a/integration-cli/docker_api_attach_test.go
+++ b/integration-cli/docker_api_attach_test.go
@@ -174,9 +174,9 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
expectTimeout(wc, br, "stdout")
// Test the client API
- client, err := client.NewClientWithOpts(client.FromEnv)
+ apiClient, err := client.NewClientWithOpts(client.FromEnv)
assert.NilError(c, err)
- defer client.Close()
+ defer apiClient.Close()
cid, _ = dockerCmd(c, "run", "-di", "busybox", "/bin/sh", "-c", "echo hello; cat")
cid = strings.TrimSpace(cid)
@@ -190,7 +190,7 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
Logs: false,
}
- resp, err := client.ContainerAttach(context.Background(), cid, attachOpts)
+ resp, err := apiClient.ContainerAttach(context.Background(), cid, attachOpts)
assert.NilError(c, err)
mediaType, b := resp.MediaType()
assert.Check(c, b)
@@ -199,7 +199,7 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
// Make sure we do see "hello" if Logs is true
attachOpts.Logs = true
- resp, err = client.ContainerAttach(context.Background(), cid, attachOpts)
+ resp, err = apiClient.ContainerAttach(context.Background(), cid, attachOpts)
assert.NilError(c, err)
defer resp.Conn.Close()
@@ -256,11 +256,11 @@ func requestHijack(method, endpoint string, data io.Reader, ct, daemon string, m
return nil, nil, errors.Wrap(err, "configure Transport error")
}
- client := http.Client{
+ c := http.Client{
Transport: transport,
}
- resp, err := client.Do(req)
+ resp, err := c.Do(req)
if err != nil {
return nil, nil, errors.Wrap(err, "client.Do")
}