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>
This commit is contained in:
Sebastiaan van Stijn
2023-04-03 13:00:29 +02:00
parent 781740c19d
commit 3beda17773
15 changed files with 244 additions and 244 deletions

View File

@@ -3791,11 +3791,11 @@ func (s *DockerCLIRunSuite) TestRunNamedVolumesFromNotRemoved(c *testing.T) {
cid, _ := dockerCmd(c, "run", "-d", "--name=parent", "-v", "test:"+prefix+"/foo", "-v", prefix+"/bar", "busybox", "true")
dockerCmd(c, "run", "--name=child", "--volumes-from=parent", "busybox", "true")
cli, err := client.NewClientWithOpts(client.FromEnv)
apiClient, err := client.NewClientWithOpts(client.FromEnv)
assert.NilError(c, err)
defer cli.Close()
defer apiClient.Close()
container, err := cli.ContainerInspect(context.Background(), strings.TrimSpace(cid))
container, err := apiClient.ContainerInspect(context.Background(), strings.TrimSpace(cid))
assert.NilError(c, err)
var vname string
for _, v := range container.Mounts {