From 75f5aa19a56ac29a537e66dac08c5aa5616028df Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Sun, 9 Nov 2025 13:52:09 +0100 Subject: [PATCH] tests: replaced stretchr/testify by go-openapi/testify Signed-off-by: Frederic BIDON --- bson_test.go | 4 ++-- conv/date_test.go | 2 +- conv/default_test.go | 2 +- conv/duration_test.go | 2 +- conv/time_test.go | 2 +- conv/ulid_test.go | 4 ++-- date_test.go | 4 ++-- default_test.go | 4 ++-- duration_test.go | 4 ++-- format_test.go | 4 ++-- go.mod | 11 +++-------- go.sum | 19 ++++--------------- mongo_test.go | 4 ++-- time_test.go | 4 ++-- ulid_test.go | 4 ++-- 15 files changed, 29 insertions(+), 45 deletions(-) diff --git a/bson_test.go b/bson_test.go index d2ef3ec..85b4b05 100644 --- a/bson_test.go +++ b/bson_test.go @@ -6,8 +6,8 @@ package strfmt import ( "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" "go.mongodb.org/mongo-driver/bson" ) diff --git a/conv/date_test.go b/conv/date_test.go index 3a22329..d719d65 100644 --- a/conv/date_test.go +++ b/conv/date_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" + "github.com/go-openapi/testify/v2/assert" "github.com/go-openapi/strfmt" ) diff --git a/conv/default_test.go b/conv/default_test.go index 94171d5..aaece3c 100644 --- a/conv/default_test.go +++ b/conv/default_test.go @@ -6,7 +6,7 @@ package conv import ( "testing" - "github.com/stretchr/testify/assert" + "github.com/go-openapi/testify/v2/assert" "github.com/go-openapi/strfmt" ) diff --git a/conv/duration_test.go b/conv/duration_test.go index c3705ab..d8a5fdb 100644 --- a/conv/duration_test.go +++ b/conv/duration_test.go @@ -6,7 +6,7 @@ package conv import ( "testing" - "github.com/stretchr/testify/assert" + "github.com/go-openapi/testify/v2/assert" "github.com/go-openapi/strfmt" ) diff --git a/conv/time_test.go b/conv/time_test.go index 88b8b67..c62417e 100644 --- a/conv/time_test.go +++ b/conv/time_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" + "github.com/go-openapi/testify/v2/assert" "github.com/go-openapi/strfmt" ) diff --git a/conv/ulid_test.go b/conv/ulid_test.go index 3f0fb94..daf5cc6 100644 --- a/conv/ulid_test.go +++ b/conv/ulid_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/go-openapi/strfmt" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" ) const testUlid = string("01EYXZVGBHG26MFTG4JWR4K558") diff --git a/date_test.go b/date_test.go index 8a70e55..27f3a5d 100644 --- a/date_test.go +++ b/date_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" ) var _ sql.Scanner = &Date{} diff --git a/default_test.go b/default_test.go index c97a8fb..6c12015 100644 --- a/default_test.go +++ b/default_test.go @@ -16,9 +16,9 @@ import ( "strings" "testing" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestFormatURI(t *testing.T) { diff --git a/duration_test.go b/duration_test.go index 4df999a..1eac2a2 100644 --- a/duration_test.go +++ b/duration_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" ) func TestDuration(t *testing.T) { diff --git a/format_test.go b/format_test.go index e4577c3..7e45c5f 100644 --- a/format_test.go +++ b/format_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" "github.com/go-viper/mapstructure/v2" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) type testFormat string diff --git a/go.mod b/go.mod index edfbe36..7337a10 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,15 @@ module github.com/go-openapi/strfmt require ( - github.com/go-openapi/errors v0.22.3 + github.com/go-openapi/errors v0.22.4 + github.com/go-openapi/testify/v2 v2.0.2 github.com/go-viper/mapstructure/v2 v2.4.0 github.com/google/uuid v1.6.0 github.com/oklog/ulid v1.3.1 - github.com/stretchr/testify v1.11.1 go.mongodb.org/mongo-driver v1.17.6 golang.org/x/net v0.46.0 ) -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/text v0.30.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) +require golang.org/x/text v0.30.0 // indirect go 1.24.0 diff --git a/go.sum b/go.sum index 66a096b..95798c7 100644 --- a/go.sum +++ b/go.sum @@ -1,31 +1,20 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs= -github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ= +github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= +github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/mongo_test.go b/mongo_test.go index c3bea1f..c49190d 100644 --- a/mongo_test.go +++ b/mongo_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "go.mongodb.org/mongo-driver/bson" ) diff --git a/time_test.go b/time_test.go index b93edb1..0848212 100644 --- a/time_test.go +++ b/time_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" ) var ( diff --git a/ulid_test.go b/ulid_test.go index f372740..ac6e1c7 100644 --- a/ulid_test.go +++ b/ulid_test.go @@ -11,8 +11,8 @@ import ( "sync" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/go-openapi/testify/v2/assert" + "github.com/go-openapi/testify/v2/require" ) const testUlid = string("01EYXZVGBHG26MFTG4JWR4K558")