Skip to content

Commit 9b54286

Browse files
fix: flaky ConfigMap/Secret args tests
* Fix a mistake in the comparison between elements in the ConfigMap and Secret args test that causes it to become flaky. * Rename the package in configmapSecretFlagsAndArgs_test.go back to util since the testpackage linter has been disabled.
1 parent fdf8f44 commit 9b54286

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kustomize/commands/internal/util/configmapSecretFlagsAndArgs_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
// Copyright 2019 The Kubernetes Authors.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
package util_test
4+
package util
55

66
import (
77
"reflect"
88
"testing"
99

1010
"github.com/stretchr/testify/require"
1111
"sigs.k8s.io/kustomize/api/types"
12-
. "sigs.k8s.io/kustomize/kustomize/v5/commands/internal/util"
1312
"sigs.k8s.io/kustomize/kyaml/filesys"
1413
)
1514

@@ -349,7 +348,7 @@ func TestUpdateLiteralSources(t *testing.T) {
349348
for _, tc := range testCases {
350349
t.Run(tc.name, func(t *testing.T) {
351350
tc.wantErr(t, UpdateLiteralSources(tc.args, tc.flags))
352-
require.Equal(t, tc.expectedArgs.LiteralSources, tc.args.LiteralSources)
351+
require.ElementsMatch(t, tc.expectedArgs.LiteralSources, tc.args.LiteralSources)
353352
})
354353
}
355354
}

0 commit comments

Comments
 (0)