diff --git a/cli/command/container/create_test.go b/cli/command/container/create_test.go index fe2651ca47..b0b8d4859e 100644 --- a/cli/command/container/create_test.go +++ b/cli/command/container/create_test.go @@ -108,6 +108,7 @@ func TestCreateContainerImagePullPolicy(t *testing.T) { }, } for _, c := range cases { + c := c pullCounter := 0 client := &fakeClient{ @@ -178,6 +179,7 @@ func TestNewCreateCommandWithContentTrustErrors(t *testing.T) { }, } for _, tc := range testCases { + tc := tc cli := test.NewFakeCli(&fakeClient{ createContainerFunc: func(config *container.Config, hostConfig *container.HostConfig, @@ -236,6 +238,7 @@ func TestNewCreateCommandWithWarnings(t *testing.T) { }, } for _, tc := range testCases { + tc := tc t.Run(tc.name, func(t *testing.T) { cli := test.NewFakeCli(&fakeClient{ createContainerFunc: func(config *container.Config,