From caec64ba49c4fb6c9a3769d80528c601ca0534c5 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 13 Jun 2024 15:22:56 +0300 Subject: [PATCH] chore: remove direct dependency on gotest.tools/v3 --- docker/types/filters/parse_test.go | 14 +++++++------- go.mod | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/types/filters/parse_test.go b/docker/types/filters/parse_test.go index 3d0ceaed..b1a3c80f 100644 --- a/docker/types/filters/parse_test.go +++ b/docker/types/filters/parse_test.go @@ -7,8 +7,8 @@ import ( "errors" "testing" - "gotest.tools/v3/assert" - is "gotest.tools/v3/assert/cmp" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestParseArgs(t *testing.T) { @@ -25,10 +25,10 @@ func TestParseArgs(t *testing.T) { for i := range flagArgs { args, err = ParseFlag(flagArgs[i], args) - assert.NilError(t, err) + require.NoError(t, err) } - assert.Check(t, is.Len(args.Get("created"), 1)) - assert.Check(t, is.Len(args.Get("image.name"), 2)) + assert.Len(t, args.Get("created"), 1) + assert.Len(t, args.Get("image.name"), 2) } func TestParseArgsEdgeCase(t *testing.T) { @@ -234,7 +234,7 @@ func TestArgsMatch(t *testing.T) { } for args, field := range matches { - assert.Check(t, args.Match(field, source), + assert.Truef(t, args.Match(field, source), "Expected field %s to match %s", field, source) } @@ -258,7 +258,7 @@ func TestArgsMatch(t *testing.T) { } for args, field := range differs { - assert.Check(t, !args.Match(field, source), "Expected field %s to not match %s", field, source) + assert.Falsef(t, args.Match(field, source), "Expected field %s to not match %s", field, source) } } diff --git a/go.mod b/go.mod index 92aef79c..ce0b6986 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,6 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 golang.org/x/sys v0.21.0 - gotest.tools/v3 v3.5.1 ) require ( @@ -39,4 +38,5 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect )