Skip to content

Commit 378e754

Browse files
committed
use consistent alias for gotest.tools/v3/assert/cmp
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7eaae97 commit 378e754

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cli-plugins/manager/candidate_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/cli/cli-plugins/metadata"
1010
"github.com/spf13/cobra"
1111
"gotest.tools/v3/assert"
12-
"gotest.tools/v3/assert/cmp"
12+
is "gotest.tools/v3/assert/cmp"
1313
)
1414

1515
type fakeCandidate struct {
@@ -81,7 +81,7 @@ func TestValidateCandidate(t *testing.T) {
8181
assert.ErrorContains(t, err, tc.err)
8282
case tc.invalid != "":
8383
assert.NilError(t, err)
84-
assert.Assert(t, cmp.ErrorType(p.Err, reflect.TypeOf(&pluginError{})))
84+
assert.Assert(t, is.ErrorType(p.Err, reflect.TypeOf(&pluginError{})))
8585
assert.ErrorContains(t, p.Err, tc.invalid)
8686
default:
8787
assert.NilError(t, err)

cli/context/store/metadata_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"github.com/docker/docker/errdefs"
1212
"gotest.tools/v3/assert"
13-
"gotest.tools/v3/assert/cmp"
13+
is "gotest.tools/v3/assert/cmp"
1414
)
1515

1616
func testMetadata(name string) Metadata {
@@ -69,8 +69,8 @@ func TestMetadataRespectJsonAnnotation(t *testing.T) {
6969
assert.NilError(t, testee.createOrUpdate(testMetadata("test")))
7070
bytes, err := os.ReadFile(filepath.Join(testDir, string(contextdirOf("test")), "meta.json"))
7171
assert.NilError(t, err)
72-
assert.Assert(t, cmp.Contains(string(bytes), "a_very_recognizable_field_name"))
73-
assert.Assert(t, cmp.Contains(string(bytes), "another_very_recognizable_field_name"))
72+
assert.Assert(t, is.Contains(string(bytes), "a_very_recognizable_field_name"))
73+
assert.Assert(t, is.Contains(string(bytes), "another_very_recognizable_field_name"))
7474
}
7575

7676
func TestMetadataList(t *testing.T) {

0 commit comments

Comments
 (0)