From e0eab08ba56d8e29ea8c2d3948792f10a72913ae Mon Sep 17 00:00:00 2001 From: anhnmt Date: Wed, 1 Nov 2023 15:01:56 +0700 Subject: [PATCH] chore: fix github.com/bxcodec/faker/v3 is deprecated --- corpx/faker.go | 2 +- courier/handler_test.go | 2 +- courier/test/persistence.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- identity/handler_test.go | 2 +- identity/test/pool.go | 2 +- internal/testhelpers/handler_mock.go | 2 +- internal/testhelpers/selfservice.go | 2 +- persistence/sql/persister_registration_code.go | 2 +- selfservice/flow/login/flow_test.go | 2 +- selfservice/flow/login/test/persistence.go | 2 +- selfservice/flow/recovery/test/persistence.go | 2 +- selfservice/flow/registration/flow_test.go | 2 +- selfservice/flow/registration/handler_test.go | 2 +- selfservice/flow/registration/test/persistence.go | 2 +- selfservice/flow/settings/error_test.go | 2 +- selfservice/flow/settings/flow_test.go | 2 +- selfservice/flow/settings/test/persistence.go | 2 +- selfservice/flow/verification/test/persistence.go | 2 +- selfservice/hook/session_destroyer_test.go | 2 +- selfservice/strategy/code/test/persistence.go | 2 +- selfservice/strategy/link/test/persistence.go | 2 +- session/handler_test.go | 2 +- session/test/persistence.go | 2 +- ui/node/node_test.go | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/corpx/faker.go b/corpx/faker.go index a633f956dd8f..e8fc4b0e388f 100644 --- a/corpx/faker.go +++ b/corpx/faker.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/ory/kratos/identity" "github.com/ory/kratos/selfservice/flow" diff --git a/courier/handler_test.go b/courier/handler_test.go index b8920a5bc5f9..28a7ec55d8b2 100644 --- a/courier/handler_test.go +++ b/courier/handler_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/tidwall/gjson" diff --git a/courier/test/persistence.go b/courier/test/persistence.go index fad80efe1742..dddd8adb2cbf 100644 --- a/courier/test/persistence.go +++ b/courier/test/persistence.go @@ -14,7 +14,7 @@ import ( "github.com/gofrs/uuid" "github.com/tidwall/gjson" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/go.mod b/go.mod index 1c3c89f958f1..262ebd0103e5 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/avast/retry-go/v3 v3.1.1 github.com/bradleyjkemp/cupaloy/v2 v2.8.0 github.com/bwmarrin/discordgo v0.23.0 - github.com/bxcodec/faker/v3 v3.3.1 + github.com/go-faker/faker/v4 v4.2.0 github.com/cenkalti/backoff v2.2.1+incompatible github.com/coreos/go-oidc v2.2.1+incompatible github.com/cortesi/modd v0.0.0-20210323234521-b35eddab86cc diff --git a/go.sum b/go.sum index d1c3f65c3160..c5d1fc506475 100644 --- a/go.sum +++ b/go.sum @@ -99,8 +99,6 @@ github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oM github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/bwmarrin/discordgo v0.23.0 h1://ARp8qUrRZvDGMkfAjtcC20WOvsMtTgi+KrdKnl6eY= github.com/bwmarrin/discordgo v0.23.0/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M= -github.com/bxcodec/faker/v3 v3.3.1 h1:G7uldFk+iO/ES7W4v7JlI/WU9FQ6op9VJ15YZlDEhGQ= -github.com/bxcodec/faker/v3 v3.3.1/go.mod h1:gF31YgnMSMKgkvl+fyEo1xuSMbEuieyqfeslGYFjneM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -210,6 +208,8 @@ github.com/go-crypt/x v0.2.1 h1:OGw78Bswme9lffCOX6tyuC280ouU5391glsvThMtM5U= github.com/go-crypt/x v0.2.1/go.mod h1:Q/y9rms7yw4/1CavBlNGn0Itg4HqwNpe1N9FX0TxXrc= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-faker/faker/v4 v4.2.0 h1:dGebOupKwssrODV51E0zbMrv5e2gO9VWSLNC1WDCpWg= +github.com/go-faker/faker/v4 v4.2.0/go.mod h1:F/bBy8GH9NxOxMInug5Gx4WYeG6fHJZ8Ol/dhcpRub4= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/identity/handler_test.go b/identity/handler_test.go index 43d432b55eb4..2e38de8db126 100644 --- a/identity/handler_test.go +++ b/identity/handler_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/peterhellberg/link" "github.com/stretchr/testify/assert" diff --git a/identity/test/pool.go b/identity/test/pool.go index f5e96960ac00..371d4a2cf6b1 100644 --- a/identity/test/pool.go +++ b/identity/test/pool.go @@ -15,7 +15,7 @@ import ( "github.com/ory/x/crdbx" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/testhelpers/handler_mock.go b/internal/testhelpers/handler_mock.go index 11031abbcca3..bcc68a1e61c1 100644 --- a/internal/testhelpers/handler_mock.go +++ b/internal/testhelpers/handler_mock.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/julienschmidt/httprouter" "github.com/pkg/errors" diff --git a/internal/testhelpers/selfservice.go b/internal/testhelpers/selfservice.go index a827aad0a6de..8c7b4c588d78 100644 --- a/internal/testhelpers/selfservice.go +++ b/internal/testhelpers/selfservice.go @@ -11,7 +11,7 @@ import ( "net/url" "testing" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gobuffalo/httptest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/persistence/sql/persister_registration_code.go b/persistence/sql/persister_registration_code.go index 5c9ac909838c..29d1af549467 100644 --- a/persistence/sql/persister_registration_code.go +++ b/persistence/sql/persister_registration_code.go @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/bxcodec/faker/v3/support/slice" + "github.com/go-faker/faker/v4/pkg/slice" "github.com/gofrs/uuid" "github.com/pkg/errors" diff --git a/selfservice/flow/login/flow_test.go b/selfservice/flow/login/flow_test.go index 1c7f1e200a53..eaf46e315ee3 100644 --- a/selfservice/flow/login/flow_test.go +++ b/selfservice/flow/login/flow_test.go @@ -23,7 +23,7 @@ import ( "github.com/ory/kratos/internal" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/login/test/persistence.go b/selfservice/flow/login/test/persistence.go index 8cfbc3b5a8eb..5dbbed75fc6d 100644 --- a/selfservice/flow/login/test/persistence.go +++ b/selfservice/flow/login/test/persistence.go @@ -11,7 +11,7 @@ import ( "github.com/ory/kratos/internal/testhelpers" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/recovery/test/persistence.go b/selfservice/flow/recovery/test/persistence.go index 665dc84b9130..8bc9efad88e0 100644 --- a/selfservice/flow/recovery/test/persistence.go +++ b/selfservice/flow/recovery/test/persistence.go @@ -7,7 +7,7 @@ import ( "context" "testing" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/registration/flow_test.go b/selfservice/flow/registration/flow_test.go index aa199becd6b5..d5c13815bb13 100644 --- a/selfservice/flow/registration/flow_test.go +++ b/selfservice/flow/registration/flow_test.go @@ -21,7 +21,7 @@ import ( "github.com/ory/kratos/driver/config" "github.com/ory/kratos/internal" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/registration/handler_test.go b/selfservice/flow/registration/handler_test.go index 1dac094b91c6..eae66fb720f8 100644 --- a/selfservice/flow/registration/handler_test.go +++ b/selfservice/flow/registration/handler_test.go @@ -16,7 +16,7 @@ import ( "testing" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/ory/kratos/corpx" diff --git a/selfservice/flow/registration/test/persistence.go b/selfservice/flow/registration/test/persistence.go index a35059c845bc..d382c23a29ba 100644 --- a/selfservice/flow/registration/test/persistence.go +++ b/selfservice/flow/registration/test/persistence.go @@ -18,7 +18,7 @@ import ( "github.com/ory/x/assertx" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/settings/error_test.go b/selfservice/flow/settings/error_test.go index 73116ba8a49a..5776cd2b6942 100644 --- a/selfservice/flow/settings/error_test.go +++ b/selfservice/flow/settings/error_test.go @@ -17,7 +17,7 @@ import ( "github.com/ory/kratos/ui/node" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gobuffalo/httptest" "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" diff --git a/selfservice/flow/settings/flow_test.go b/selfservice/flow/settings/flow_test.go index 0a4da77f323d..26a40b71245d 100644 --- a/selfservice/flow/settings/flow_test.go +++ b/selfservice/flow/settings/flow_test.go @@ -22,7 +22,7 @@ import ( "github.com/ory/kratos/internal" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/settings/test/persistence.go b/selfservice/flow/settings/test/persistence.go index 62bce9c547bf..85c80e49d74e 100644 --- a/selfservice/flow/settings/test/persistence.go +++ b/selfservice/flow/settings/test/persistence.go @@ -22,7 +22,7 @@ import ( "github.com/ory/kratos/ui/node" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/flow/verification/test/persistence.go b/selfservice/flow/verification/test/persistence.go index 0358462029f7..57c35cba8d2e 100644 --- a/selfservice/flow/verification/test/persistence.go +++ b/selfservice/flow/verification/test/persistence.go @@ -7,7 +7,7 @@ import ( "context" "testing" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/hook/session_destroyer_test.go b/selfservice/hook/session_destroyer_test.go index 653f77111209..e2d0cc21c2e2 100644 --- a/selfservice/hook/session_destroyer_test.go +++ b/selfservice/hook/session_destroyer_test.go @@ -13,7 +13,7 @@ import ( "github.com/ory/kratos/corpx" "github.com/ory/kratos/ui/node" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gobuffalo/httptest" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" diff --git a/selfservice/strategy/code/test/persistence.go b/selfservice/strategy/code/test/persistence.go index f505bcb9c185..f3c120402ddb 100644 --- a/selfservice/strategy/code/test/persistence.go +++ b/selfservice/strategy/code/test/persistence.go @@ -14,7 +14,7 @@ import ( "github.com/ory/kratos/selfservice/strategy/code" "github.com/ory/x/randx" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/selfservice/strategy/link/test/persistence.go b/selfservice/strategy/link/test/persistence.go index 63abe6179f18..af5738eaae31 100644 --- a/selfservice/strategy/link/test/persistence.go +++ b/selfservice/strategy/link/test/persistence.go @@ -14,7 +14,7 @@ import ( "github.com/ory/kratos/selfservice/strategy/link" "github.com/ory/x/sqlcon" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/session/handler_test.go b/session/handler_test.go index b24644880cc7..286943796927 100644 --- a/session/handler_test.go +++ b/session/handler_test.go @@ -17,7 +17,7 @@ import ( "testing" "time" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/tidwall/gjson" "github.com/ory/kratos/identity" diff --git a/session/test/persistence.go b/session/test/persistence.go index d2a37837c7e9..fb6a7c469830 100644 --- a/session/test/persistence.go +++ b/session/test/persistence.go @@ -14,7 +14,7 @@ import ( "github.com/ory/kratos/identity" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ui/node/node_test.go b/ui/node/node_test.go index cfa425632ef2..f8867b98c2a3 100644 --- a/ui/node/node_test.go +++ b/ui/node/node_test.go @@ -17,7 +17,7 @@ import ( "github.com/ory/kratos/ui/container" - "github.com/bxcodec/faker/v3" + "github.com/go-faker/faker/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson"