Skip to content

Commit

Permalink
Merge pull request moby#48351 from thaJeztah/integration_nits3
Browse files Browse the repository at this point in the history
integration/container: rename var that collided with import
  • Loading branch information
vvoland authored Aug 20, 2024
2 parents 2c0100f + 1804f0c commit 22b5cb2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions integration/container/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

func TestCreateFailsWhenIdentifierDoesNotExist(t *testing.T) {
ctx := setupTest(t)
client := testEnv.APIClient()
apiClient := testEnv.APIClient()

testCases := []struct {
doc string
Expand Down Expand Up @@ -58,7 +58,7 @@ func TestCreateFailsWhenIdentifierDoesNotExist(t *testing.T) {
t.Run(tc.doc, func(t *testing.T) {
t.Parallel()
ctx := testutil.StartSpan(ctx, t)
_, err := client.ContainerCreate(ctx,
_, err := apiClient.ContainerCreate(ctx,
&container.Config{Image: tc.image},
&container.HostConfig{},
&network.NetworkingConfig{},
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestCreateLinkToNonExistingContainer(t *testing.T) {

func TestCreateWithInvalidEnv(t *testing.T) {
ctx := setupTest(t)
client := testEnv.APIClient()
apiClient := testEnv.APIClient()

testCases := []struct {
env string
Expand All @@ -121,7 +121,7 @@ func TestCreateWithInvalidEnv(t *testing.T) {
t.Run(strconv.Itoa(index), func(t *testing.T) {
t.Parallel()
ctx := testutil.StartSpan(ctx, t)
_, err := client.ContainerCreate(ctx,
_, err := apiClient.ContainerCreate(ctx,
&container.Config{
Image: "busybox",
Env: []string{tc.env},
Expand All @@ -142,7 +142,7 @@ func TestCreateTmpfsMountsTarget(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType == "windows")
ctx := setupTest(t)

client := testEnv.APIClient()
apiClient := testEnv.APIClient()

testCases := []struct {
target string
Expand All @@ -167,7 +167,7 @@ func TestCreateTmpfsMountsTarget(t *testing.T) {
}

for _, tc := range testCases {
_, err := client.ContainerCreate(ctx,
_, err := apiClient.ContainerCreate(ctx,
&container.Config{
Image: "busybox",
},
Expand Down Expand Up @@ -221,7 +221,7 @@ func TestCreateWithCustomMaskedPaths(t *testing.T) {
maskedPaths, ok := cfg["MaskedPaths"].([]interface{})
assert.Check(t, is.Equal(true, ok), name)

mps := []string{}
var mps = make([]string, 0, len(maskedPaths))
for _, mp := range maskedPaths {
mps = append(mps, mp.(string))
}
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestCreateWithCustomReadonlyPaths(t *testing.T) {
readonlyPaths, ok := cfg["ReadonlyPaths"].([]interface{})
assert.Check(t, is.Equal(true, ok), name)

rops := []string{}
var rops = make([]string, 0, len(readonlyPaths))
for _, rop := range readonlyPaths {
rops = append(rops, rop.(string))
}
Expand Down Expand Up @@ -428,7 +428,7 @@ func TestCreateWithInvalidHealthcheckParams(t *testing.T) {
}
}

// Make sure that anonymous volumes can be overritten by tmpfs
// Make sure that anonymous volumes can be overwritten by tmpfs
// https://github.com/moby/moby/issues/40446
func TestCreateTmpfsOverrideAnonymousVolume(t *testing.T) {
skip.If(t, testEnv.DaemonInfo.OSType == "windows", "windows does not support tmpfs")
Expand Down

0 comments on commit 22b5cb2

Please sign in to comment.