diff --git a/Makefile b/Makefile index 7fcf80d1bd5..77916ff01dd 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ install-go-tools: mod-download ## Download and install Go dependencies go install github.com/golang/protobuf/protoc-gen-go go install golang.org/x/tools/cmd/goimports go install github.com/cratonica/2goarray - go install go.uber.org/mock/mockgen + go install github.com/golang/mock/mockgen go install github.com/saiskee/gettercheck # This version must stay in sync with the version used in CI: .github/workflows/static-analysis.yaml go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 diff --git a/ci/tools.go b/ci/tools.go index 3625ff8c221..7b32b5f62d6 100644 --- a/ci/tools.go +++ b/ci/tools.go @@ -20,10 +20,10 @@ package tools import ( _ "github.com/cratonica/2goarray" _ "github.com/envoyproxy/protoc-gen-validate" + _ "github.com/golang/mock/mockgen" _ "github.com/saiskee/gettercheck" _ "github.com/solo-io/protoc-gen-ext" _ "github.com/solo-io/protoc-gen-openapi" - _ "go.uber.org/mock/mockgen" _ "golang.org/x/tools/cmd/goimports" _ "k8s.io/code-generator" ) diff --git a/docs/content/static/content/osa_provided.md b/docs/content/static/content/osa_provided.md index 7a45596943b..4ad71949bde 100644 --- a/docs/content/static/content/osa_provided.md +++ b/docs/content/static/content/osa_provided.md @@ -45,7 +45,6 @@ Name|Version|License [spf13/viper](https://github.com/spf13/viper)|v1.8.1|MIT License [go.opencensus.io](https://go.opencensus.io)|v0.24.0|Apache License 2.0 [go.uber.org/goleak](https://go.uber.org/goleak)|v1.2.1|MIT License -[go.uber.org/mock](https://go.uber.org/mock)|v0.3.0|Apache License 2.0 [go.uber.org/multierr](https://go.uber.org/multierr)|v1.11.0|MIT License [go.uber.org/zap](https://go.uber.org/zap)|v1.26.0|MIT License [x/crypto](https://golang.org/x/crypto)|v0.17.0|BSD 3-clause "New" or "Revised" License diff --git a/docs/examples/grpc-json-transcoding/bookstore/go.sum b/docs/examples/grpc-json-transcoding/bookstore/go.sum index 10d35e759b7..4087ddced66 100644 --- a/docs/examples/grpc-json-transcoding/bookstore/go.sum +++ b/docs/examples/grpc-json-transcoding/bookstore/go.sum @@ -11,7 +11,7 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -go.uber.org/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/docs/examples/grpc-passthrough-auth/go.sum b/docs/examples/grpc-passthrough-auth/go.sum index ef650970f63..7228a74a0ee 100644 --- a/docs/examples/grpc-passthrough-auth/go.sum +++ b/docs/examples/grpc-passthrough-auth/go.sum @@ -13,7 +13,7 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrp github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -go.uber.org/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= diff --git a/example/proxycontroller/go.sum b/example/proxycontroller/go.sum index 2a55998fdf8..305ff5cc62d 100644 --- a/example/proxycontroller/go.sum +++ b/example/proxycontroller/go.sum @@ -755,16 +755,16 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18h github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 h1:2hRPrmiwPrp3fQX967rNJIhQPtiGXdlQWAxKbKw3VHA= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -go.uber.org/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -go.uber.org/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -go.uber.org/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -go.uber.org/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -go.uber.org/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -go.uber.org/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -go.uber.org/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -go.uber.org/mock v1.4.4-0.20200406172829-6d816de489c1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -go.uber.org/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= -go.uber.org/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4-0.20200406172829-6d816de489c1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/go.mod b/go.mod index 0b00c544627..2a0b52057e3 100644 --- a/go.mod +++ b/go.mod @@ -89,9 +89,9 @@ require ( require ( github.com/go-logr/zapr v1.2.4 + github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.1 github.com/quasilyte/go-ruleguard/dsl v0.3.22 - go.uber.org/mock v0.3.0 golang.org/x/exp v0.0.0-20231006140011-7918f672742d google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d @@ -172,7 +172,6 @@ require ( github.com/go-test/deep v1.0.7 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect diff --git a/go.sum b/go.sum index 650a14322d4..becc7d49a28 100644 --- a/go.sum +++ b/go.sum @@ -2123,8 +2123,6 @@ go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= -go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= diff --git a/pkg/listers/mocks/mock_listers.go b/pkg/listers/mocks/mock_listers.go index 8cda8a2c8cb..a6cdb355bd5 100644 --- a/pkg/listers/mocks/mock_listers.go +++ b/pkg/listers/mocks/mock_listers.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/pkg/listers (interfaces: NamespaceLister) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_listers.go -package mocks github.com/solo-io/gloo/pkg/listers NamespaceLister -// + // Package mocks is a generated GoMock package. package mocks @@ -12,7 +8,7 @@ import ( context "context" reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" ) // MockNamespaceLister is a mock of NamespaceLister interface. @@ -48,7 +44,7 @@ func (m *MockNamespaceLister) List(arg0 context.Context) ([]string, error) { } // List indicates an expected call of List. -func (mr *MockNamespaceListerMockRecorder) List(arg0 any) *gomock.Call { +func (mr *MockNamespaceListerMockRecorder) List(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNamespaceLister)(nil).List), arg0) } diff --git a/pkg/utils/selectionutils/mocks/mock_virtual_service.go b/pkg/utils/selectionutils/mocks/mock_virtual_service.go index 157abd921ef..6950dca80bf 100644 --- a/pkg/utils/selectionutils/mocks/mock_virtual_service.go +++ b/pkg/utils/selectionutils/mocks/mock_virtual_service.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/pkg/utils/selectionutils (interfaces: VirtualServiceSelector) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_virtual_service.go -package mocks github.com/solo-io/gloo/pkg/utils/selectionutils VirtualServiceSelector -// + // Package mocks is a generated GoMock package. package mocks @@ -12,9 +8,9 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" core "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" - gomock "go.uber.org/mock/gomock" ) // MockVirtualServiceSelector is a mock of VirtualServiceSelector interface. @@ -50,7 +46,7 @@ func (m *MockVirtualServiceSelector) SelectOrBuildVirtualService(arg0 context.Co } // SelectOrBuildVirtualService indicates an expected call of SelectOrBuildVirtualService. -func (mr *MockVirtualServiceSelectorMockRecorder) SelectOrBuildVirtualService(arg0, arg1 any) *gomock.Call { +func (mr *MockVirtualServiceSelectorMockRecorder) SelectOrBuildVirtualService(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectOrBuildVirtualService", reflect.TypeOf((*MockVirtualServiceSelector)(nil).SelectOrBuildVirtualService), arg0, arg1) } diff --git a/pkg/utils/selectionutils/virtual_service_test.go b/pkg/utils/selectionutils/virtual_service_test.go index f35850d86cc..7414e1693d9 100644 --- a/pkg/utils/selectionutils/virtual_service_test.go +++ b/pkg/utils/selectionutils/virtual_service_test.go @@ -3,6 +3,7 @@ package selectionutils_test import ( "context" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" errors "github.com/rotisserie/eris" @@ -14,7 +15,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" sk_errors "github.com/solo-io/solo-kit/pkg/errors" "github.com/solo-io/solo-kit/test/matchers" - "go.uber.org/mock/gomock" ) var ( diff --git a/projects/gateway/pkg/mocks/mock_gateway_client.go b/projects/gateway/pkg/mocks/mock_gateway_client.go index f4b5658f707..c38aad1f6e1 100644 --- a/projects/gateway/pkg/mocks/mock_gateway_client.go +++ b/projects/gateway/pkg/mocks/mock_gateway_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockGatewayClient is a mock of GatewayClient interface diff --git a/projects/gateway/pkg/mocks/mock_route_table_client.go b/projects/gateway/pkg/mocks/mock_route_table_client.go index d84b2c0e52c..df5862c607b 100644 --- a/projects/gateway/pkg/mocks/mock_route_table_client.go +++ b/projects/gateway/pkg/mocks/mock_route_table_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockRouteTableClient is a mock of RouteTableClient interface diff --git a/projects/gateway/pkg/mocks/mock_v1/mock_gateway_client.go b/projects/gateway/pkg/mocks/mock_v1/mock_gateway_client.go index f3dda259039..72c87b46c9f 100644 --- a/projects/gateway/pkg/mocks/mock_v1/mock_gateway_client.go +++ b/projects/gateway/pkg/mocks/mock_v1/mock_gateway_client.go @@ -7,9 +7,9 @@ package mock_v1 import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockGatewayClient is a mock of GatewayClient interface diff --git a/projects/gateway/pkg/mocks/mock_v1/mock_virtual_service_client.go b/projects/gateway/pkg/mocks/mock_v1/mock_virtual_service_client.go index 43d015e56b4..ee71db3188e 100644 --- a/projects/gateway/pkg/mocks/mock_v1/mock_virtual_service_client.go +++ b/projects/gateway/pkg/mocks/mock_v1/mock_virtual_service_client.go @@ -7,9 +7,9 @@ package mock_v1 import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockVirtualServiceClient is a mock of VirtualServiceClient interface diff --git a/projects/gateway/pkg/mocks/mock_virtual_service_client.go b/projects/gateway/pkg/mocks/mock_virtual_service_client.go index aa886caf535..9992e902490 100644 --- a/projects/gateway/pkg/mocks/mock_virtual_service_client.go +++ b/projects/gateway/pkg/mocks/mock_virtual_service_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockVirtualServiceClient is a mock of VirtualServiceClient interface diff --git a/projects/gateway/pkg/syncer/translator_syncer_test.go b/projects/gateway/pkg/syncer/translator_syncer_test.go index 5664002fc26..4d455cf6d97 100644 --- a/projects/gateway/pkg/syncer/translator_syncer_test.go +++ b/projects/gateway/pkg/syncer/translator_syncer_test.go @@ -10,6 +10,7 @@ import ( "github.com/solo-io/gloo/pkg/utils/statusutils" "github.com/solo-io/gloo/projects/gateway/pkg/utils/metrics" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/solo-io/gloo/pkg/utils/settingsutil" @@ -25,7 +26,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/resources" "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" "github.com/solo-io/solo-kit/pkg/api/v2/reporter" - "go.uber.org/mock/gomock" ) var _ = Describe("TranslatorSyncer", func() { diff --git a/projects/gateway/pkg/translator/mocks/mock_translator.go b/projects/gateway/pkg/translator/mocks/mock_translator.go index 6c4fc9d21cb..3eb52f75b1b 100644 --- a/projects/gateway/pkg/translator/mocks/mock_translator.go +++ b/projects/gateway/pkg/translator/mocks/mock_translator.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gateway/pkg/translator (interfaces: Translator) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_translator.go -package mocks github.com/solo-io/gloo/projects/gateway/pkg/translator Translator -// + // Package mocks is a generated GoMock package. package mocks @@ -12,11 +8,11 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" v10 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" gloosnapshot "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/gloosnapshot" reporter "github.com/solo-io/solo-kit/pkg/api/v2/reporter" - gomock "go.uber.org/mock/gomock" ) // MockTranslator is a mock of Translator interface. @@ -52,7 +48,7 @@ func (m *MockTranslator) Translate(arg0 context.Context, arg1 string, arg2 *gloo } // Translate indicates an expected call of Translate. -func (mr *MockTranslatorMockRecorder) Translate(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockTranslatorMockRecorder) Translate(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Translate", reflect.TypeOf((*MockTranslator)(nil).Translate), arg0, arg1, arg2, arg3) } diff --git a/projects/gateway2/translator/plugins/mirror/mirror_plugin_test.go b/projects/gateway2/translator/plugins/mirror/mirror_plugin_test.go index 6633900c7c7..3183c3d17aa 100644 --- a/projects/gateway2/translator/plugins/mirror/mirror_plugin_test.go +++ b/projects/gateway2/translator/plugins/mirror/mirror_plugin_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" + "github.com/golang/mock/gomock" "github.com/onsi/gomega" "github.com/solo-io/gloo/projects/gateway2/translator/plugins" "github.com/solo-io/gloo/projects/gateway2/translator/plugins/mirror" "github.com/solo-io/gloo/projects/gateway2/translator/plugins/mirror/mocks" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" - "go.uber.org/mock/gomock" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gwv1 "sigs.k8s.io/gateway-api/apis/v1" diff --git a/projects/gateway2/translator/plugins/mirror/mocks/mock_queries.go b/projects/gateway2/translator/plugins/mirror/mocks/mock_queries.go index c4d77968cd9..9b1a3c7123f 100644 --- a/projects/gateway2/translator/plugins/mirror/mocks/mock_queries.go +++ b/projects/gateway2/translator/plugins/mirror/mocks/mock_queries.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gateway2/query (interfaces: GatewayQueries) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_queries.go -package mocks github.com/solo-io/gloo/projects/gateway2/query GatewayQueries -// + // Package mocks is a generated GoMock package. package mocks @@ -12,8 +8,8 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" query "github.com/solo-io/gloo/projects/gateway2/query" - gomock "go.uber.org/mock/gomock" client "sigs.k8s.io/controller-runtime/pkg/client" v1 "sigs.k8s.io/gateway-api/apis/v1" ) @@ -51,7 +47,7 @@ func (m *MockGatewayQueries) GetBackendForRef(arg0 context.Context, arg1 query.F } // GetBackendForRef indicates an expected call of GetBackendForRef. -func (mr *MockGatewayQueriesMockRecorder) GetBackendForRef(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockGatewayQueriesMockRecorder) GetBackendForRef(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBackendForRef", reflect.TypeOf((*MockGatewayQueries)(nil).GetBackendForRef), arg0, arg1, arg2) } @@ -66,7 +62,7 @@ func (m *MockGatewayQueries) GetLocalObjRef(arg0 context.Context, arg1 query.Fro } // GetLocalObjRef indicates an expected call of GetLocalObjRef. -func (mr *MockGatewayQueriesMockRecorder) GetLocalObjRef(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockGatewayQueriesMockRecorder) GetLocalObjRef(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLocalObjRef", reflect.TypeOf((*MockGatewayQueries)(nil).GetLocalObjRef), arg0, arg1, arg2) } @@ -81,7 +77,7 @@ func (m *MockGatewayQueries) GetRoutesForGw(arg0 context.Context, arg1 *v1.Gatew } // GetRoutesForGw indicates an expected call of GetRoutesForGw. -func (mr *MockGatewayQueriesMockRecorder) GetRoutesForGw(arg0, arg1 any) *gomock.Call { +func (mr *MockGatewayQueriesMockRecorder) GetRoutesForGw(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoutesForGw", reflect.TypeOf((*MockGatewayQueries)(nil).GetRoutesForGw), arg0, arg1) } @@ -96,7 +92,7 @@ func (m *MockGatewayQueries) GetSecretForRef(arg0 context.Context, arg1 query.Fr } // GetSecretForRef indicates an expected call of GetSecretForRef. -func (mr *MockGatewayQueriesMockRecorder) GetSecretForRef(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockGatewayQueriesMockRecorder) GetSecretForRef(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecretForRef", reflect.TypeOf((*MockGatewayQueries)(nil).GetSecretForRef), arg0, arg1, arg2) } @@ -110,7 +106,7 @@ func (m *MockGatewayQueries) ObjToFrom(arg0 client.Object) query.From { } // ObjToFrom indicates an expected call of ObjToFrom. -func (mr *MockGatewayQueriesMockRecorder) ObjToFrom(arg0 any) *gomock.Call { +func (mr *MockGatewayQueriesMockRecorder) ObjToFrom(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjToFrom", reflect.TypeOf((*MockGatewayQueries)(nil).ObjToFrom), arg0) } diff --git a/projects/gloo/cli/pkg/cmd/install/installer_test.go b/projects/gloo/cli/pkg/cmd/install/installer_test.go index 30c65c4a5ff..5950ef025b9 100644 --- a/projects/gloo/cli/pkg/cmd/install/installer_test.go +++ b/projects/gloo/cli/pkg/cmd/install/installer_test.go @@ -6,6 +6,7 @@ import ( "k8s.io/client-go/kubernetes/fake" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/solo-io/gloo/pkg/version" @@ -14,7 +15,6 @@ import ( "github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/options" "github.com/solo-io/gloo/projects/gloo/cli/pkg/constants" "github.com/solo-io/gloo/projects/gloo/pkg/defaults" - "go.uber.org/mock/gomock" helmchart "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/release" diff --git a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_client.go b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_client.go index b839338db37..753ee7cea1e 100644 --- a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_client.go +++ b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_client.go @@ -1,18 +1,14 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install (interfaces: HelmClient) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_helm_client.go -package mocks github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install HelmClient -// + // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" install "github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install" - gomock "go.uber.org/mock/gomock" chart "helm.sh/helm/v3/pkg/chart" cli "helm.sh/helm/v3/pkg/cli" ) @@ -50,7 +46,7 @@ func (m *MockHelmClient) DownloadChart(arg0 string) (*chart.Chart, error) { } // DownloadChart indicates an expected call of DownloadChart. -func (mr *MockHelmClientMockRecorder) DownloadChart(arg0 any) *gomock.Call { +func (mr *MockHelmClientMockRecorder) DownloadChart(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadChart", reflect.TypeOf((*MockHelmClient)(nil).DownloadChart), arg0) } @@ -66,7 +62,7 @@ func (m *MockHelmClient) NewInstall(arg0, arg1 string, arg2 bool, arg3 string) ( } // NewInstall indicates an expected call of NewInstall. -func (mr *MockHelmClientMockRecorder) NewInstall(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockHelmClientMockRecorder) NewInstall(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewInstall", reflect.TypeOf((*MockHelmClient)(nil).NewInstall), arg0, arg1, arg2, arg3) } @@ -81,7 +77,7 @@ func (m *MockHelmClient) NewUninstall(arg0 string) (install.HelmUninstallation, } // NewUninstall indicates an expected call of NewUninstall. -func (mr *MockHelmClientMockRecorder) NewUninstall(arg0 any) *gomock.Call { +func (mr *MockHelmClientMockRecorder) NewUninstall(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewUninstall", reflect.TypeOf((*MockHelmClient)(nil).NewUninstall), arg0) } @@ -96,7 +92,7 @@ func (m *MockHelmClient) ReleaseExists(arg0, arg1 string) (bool, error) { } // ReleaseExists indicates an expected call of ReleaseExists. -func (mr *MockHelmClientMockRecorder) ReleaseExists(arg0, arg1 any) *gomock.Call { +func (mr *MockHelmClientMockRecorder) ReleaseExists(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseExists", reflect.TypeOf((*MockHelmClient)(nil).ReleaseExists), arg0, arg1) } @@ -111,7 +107,7 @@ func (m *MockHelmClient) ReleaseList(arg0 string) (install.HelmReleaseListRunner } // ReleaseList indicates an expected call of ReleaseList. -func (mr *MockHelmClientMockRecorder) ReleaseList(arg0 any) *gomock.Call { +func (mr *MockHelmClientMockRecorder) ReleaseList(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseList", reflect.TypeOf((*MockHelmClient)(nil).ReleaseList), arg0) } diff --git a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_installation.go b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_installation.go index 5723d7422ca..dd79ce0ed0f 100644 --- a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_installation.go +++ b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_installation.go @@ -1,17 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install (interfaces: HelmInstallation) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_helm_installation.go -package mocks github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install HelmInstallation -// + // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" chart "helm.sh/helm/v3/pkg/chart" release "helm.sh/helm/v3/pkg/release" ) @@ -40,7 +36,7 @@ func (m *MockHelmInstallation) EXPECT() *MockHelmInstallationMockRecorder { } // Run mocks base method. -func (m *MockHelmInstallation) Run(arg0 *chart.Chart, arg1 map[string]any) (*release.Release, error) { +func (m *MockHelmInstallation) Run(arg0 *chart.Chart, arg1 map[string]interface{}) (*release.Release, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Run", arg0, arg1) ret0, _ := ret[0].(*release.Release) @@ -49,7 +45,7 @@ func (m *MockHelmInstallation) Run(arg0 *chart.Chart, arg1 map[string]any) (*rel } // Run indicates an expected call of Run. -func (mr *MockHelmInstallationMockRecorder) Run(arg0, arg1 any) *gomock.Call { +func (mr *MockHelmInstallationMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockHelmInstallation)(nil).Run), arg0, arg1) } diff --git a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_release_list.go b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_release_list.go index 79674899d97..ce0aaa15322 100644 --- a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_release_list.go +++ b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_release_list.go @@ -1,17 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install (interfaces: HelmReleaseListRunner) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_helm_release_list.go -package mocks github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install HelmReleaseListRunner -// + // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" release "helm.sh/helm/v3/pkg/release" ) @@ -60,7 +56,7 @@ func (m *MockHelmReleaseListRunner) SetFilter(arg0 string) { } // SetFilter indicates an expected call of SetFilter. -func (mr *MockHelmReleaseListRunnerMockRecorder) SetFilter(arg0 any) *gomock.Call { +func (mr *MockHelmReleaseListRunnerMockRecorder) SetFilter(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFilter", reflect.TypeOf((*MockHelmReleaseListRunner)(nil).SetFilter), arg0) } diff --git a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_uninstallation.go b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_uninstallation.go index 738d15974ac..3f4d94ea5a4 100644 --- a/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_uninstallation.go +++ b/projects/gloo/cli/pkg/cmd/install/mocks/mock_helm_uninstallation.go @@ -1,17 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install (interfaces: HelmUninstallation) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_helm_uninstallation.go -package mocks github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/install HelmUninstallation -// + // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" release "helm.sh/helm/v3/pkg/release" ) @@ -48,7 +44,7 @@ func (m *MockHelmUninstallation) Run(arg0 string) (*release.UninstallReleaseResp } // Run indicates an expected call of Run. -func (mr *MockHelmUninstallationMockRecorder) Run(arg0 any) *gomock.Call { +func (mr *MockHelmUninstallationMockRecorder) Run(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockHelmUninstallation)(nil).Run), arg0) } diff --git a/projects/gloo/cli/pkg/cmd/install/uninstall_test.go b/projects/gloo/cli/pkg/cmd/install/uninstall_test.go index aa54513ab0f..28be10be0bb 100644 --- a/projects/gloo/cli/pkg/cmd/install/uninstall_test.go +++ b/projects/gloo/cli/pkg/cmd/install/uninstall_test.go @@ -6,6 +6,7 @@ import ( "fmt" "strings" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/solo-io/gloo/pkg/cliutil/testutil" @@ -14,7 +15,6 @@ import ( "github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/options" "github.com/solo-io/gloo/projects/gloo/cli/pkg/constants" "github.com/solo-io/gloo/projects/gloo/pkg/defaults" - "go.uber.org/mock/gomock" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/release" ) diff --git a/projects/gloo/cli/pkg/cmd/version/mocks/mock_watcher.go b/projects/gloo/cli/pkg/cmd/version/mocks/mock_watcher.go index 9c411e0f95b..298ab231686 100644 --- a/projects/gloo/cli/pkg/cmd/version/mocks/mock_watcher.go +++ b/projects/gloo/cli/pkg/cmd/version/mocks/mock_watcher.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: clients.go -// -// Generated by this command: -// -// mockgen -destination ./mocks/mock_watcher.go -source clients.go -// + // Package mock_version is a generated GoMock package. package mock_version @@ -12,8 +8,8 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" version "github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/version" - gomock "go.uber.org/mock/gomock" ) // MockServerVersion is a mock of ServerVersion interface. @@ -49,7 +45,7 @@ func (m *MockServerVersion) Get(ctx context.Context) ([]*version.ServerVersion, } // Get indicates an expected call of Get. -func (mr *MockServerVersionMockRecorder) Get(ctx any) *gomock.Call { +func (mr *MockServerVersionMockRecorder) Get(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockServerVersion)(nil).Get), ctx) } diff --git a/projects/gloo/cli/pkg/cmd/version/version_test.go b/projects/gloo/cli/pkg/cmd/version/version_test.go index b8354e588c7..afed57ff874 100644 --- a/projects/gloo/cli/pkg/cmd/version/version_test.go +++ b/projects/gloo/cli/pkg/cmd/version/version_test.go @@ -5,6 +5,7 @@ import ( "context" "fmt" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/rotisserie/eris" @@ -13,7 +14,6 @@ import ( mock_version "github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/version/mocks" "github.com/solo-io/gloo/projects/gloo/cli/pkg/printers" "github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/version" - "go.uber.org/mock/gomock" ) var _ = Describe("version command", func() { diff --git a/projects/gloo/pkg/bootstrap/clients/vault/auth_test.go b/projects/gloo/pkg/bootstrap/clients/vault/auth_test.go index 5898ac9328a..14ef949a7a4 100644 --- a/projects/gloo/pkg/bootstrap/clients/vault/auth_test.go +++ b/projects/gloo/pkg/bootstrap/clients/vault/auth_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/avast/retry-go" + "github.com/golang/mock/gomock" "github.com/hashicorp/vault/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -13,7 +14,6 @@ import ( "github.com/rotisserie/eris" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" . "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault" - "go.uber.org/mock/gomock" "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault/mocks" "github.com/solo-io/gloo/test/gomega/assertions" diff --git a/projects/gloo/pkg/bootstrap/clients/vault/client_test.go b/projects/gloo/pkg/bootstrap/clients/vault/client_test.go index 54203c9c74f..77f13470f36 100644 --- a/projects/gloo/pkg/bootstrap/clients/vault/client_test.go +++ b/projects/gloo/pkg/bootstrap/clients/vault/client_test.go @@ -5,13 +5,13 @@ import ( "time" "github.com/avast/retry-go" + "github.com/golang/mock/gomock" vaultapi "github.com/hashicorp/vault/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/rotisserie/eris" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" . "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault" - "go.uber.org/mock/gomock" "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault/mocks" "github.com/solo-io/gloo/test/gomega/assertions" diff --git a/projects/gloo/pkg/bootstrap/clients/vault/mocks/mock_auth.go b/projects/gloo/pkg/bootstrap/clients/vault/mocks/mock_auth.go index 542ac641aee..8ade01d7e97 100644 --- a/projects/gloo/pkg/bootstrap/clients/vault/mocks/mock_auth.go +++ b/projects/gloo/pkg/bootstrap/clients/vault/mocks/mock_auth.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/hashicorp/vault/api (interfaces: AuthMethod) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_auth.go -package mocks github.com/hashicorp/vault/api AuthMethod -// + // Package mocks is a generated GoMock package. package mocks @@ -12,8 +8,8 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" api "github.com/hashicorp/vault/api" - gomock "go.uber.org/mock/gomock" ) // MockAuthMethod is a mock of AuthMethod interface. @@ -49,7 +45,7 @@ func (m *MockAuthMethod) Login(arg0 context.Context, arg1 *api.Client) (*api.Sec } // Login indicates an expected call of Login. -func (mr *MockAuthMethodMockRecorder) Login(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthMethodMockRecorder) Login(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockAuthMethod)(nil).Login), arg0, arg1) } diff --git a/projects/gloo/pkg/bootstrap/clients/vault/renewal_test.go b/projects/gloo/pkg/bootstrap/clients/vault/renewal_test.go index 68dd89125a5..e95c00334d0 100644 --- a/projects/gloo/pkg/bootstrap/clients/vault/renewal_test.go +++ b/projects/gloo/pkg/bootstrap/clients/vault/renewal_test.go @@ -5,11 +5,11 @@ import ( "time" "github.com/avast/retry-go" + "github.com/golang/mock/gomock" vault "github.com/hashicorp/vault/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" errors "github.com/rotisserie/eris" - "go.uber.org/mock/gomock" . "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault" "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap/clients/vault/mocks" diff --git a/projects/gloo/pkg/discovery/discovery_test.go b/projects/gloo/pkg/discovery/discovery_test.go index b6092ab480c..78eea0bdc4b 100644 --- a/projects/gloo/pkg/discovery/discovery_test.go +++ b/projects/gloo/pkg/discovery/discovery_test.go @@ -6,6 +6,7 @@ import ( "github.com/solo-io/gloo/pkg/utils/statusutils" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" @@ -16,7 +17,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/clients/memory" "github.com/solo-io/solo-kit/pkg/api/v1/resources" "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" - "go.uber.org/mock/gomock" . "github.com/solo-io/gloo/projects/gloo/pkg/discovery" ) diff --git a/projects/gloo/pkg/discovery/mocks/mock_discovery.go b/projects/gloo/pkg/discovery/mocks/mock_discovery.go index c6c2a620209..9600b5e9e0b 100644 --- a/projects/gloo/pkg/discovery/mocks/mock_discovery.go +++ b/projects/gloo/pkg/discovery/mocks/mock_discovery.go @@ -1,21 +1,17 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/pkg/discovery (interfaces: DiscoveryPlugin) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_discovery.go -package mocks github.com/solo-io/gloo/projects/gloo/pkg/discovery DiscoveryPlugin -// + // Package mocks is a generated GoMock package. package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" discovery "github.com/solo-io/gloo/projects/gloo/pkg/discovery" plugins "github.com/solo-io/gloo/projects/gloo/pkg/plugins" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockDiscoveryPlugin is a mock of DiscoveryPlugin interface. @@ -52,7 +48,7 @@ func (m *MockDiscoveryPlugin) DiscoverUpstreams(arg0 []string, arg1 string, arg2 } // DiscoverUpstreams indicates an expected call of DiscoverUpstreams. -func (mr *MockDiscoveryPluginMockRecorder) DiscoverUpstreams(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockDiscoveryPluginMockRecorder) DiscoverUpstreams(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoverUpstreams", reflect.TypeOf((*MockDiscoveryPlugin)(nil).DiscoverUpstreams), arg0, arg1, arg2, arg3) } @@ -64,7 +60,7 @@ func (m *MockDiscoveryPlugin) Init(arg0 plugins.InitParams) { } // Init indicates an expected call of Init. -func (mr *MockDiscoveryPluginMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockDiscoveryPluginMockRecorder) Init(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockDiscoveryPlugin)(nil).Init), arg0) } @@ -93,7 +89,7 @@ func (m *MockDiscoveryPlugin) UpdateUpstream(arg0, arg1 *v1.Upstream) (bool, err } // UpdateUpstream indicates an expected call of UpdateUpstream. -func (mr *MockDiscoveryPluginMockRecorder) UpdateUpstream(arg0, arg1 any) *gomock.Call { +func (mr *MockDiscoveryPluginMockRecorder) UpdateUpstream(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUpstream", reflect.TypeOf((*MockDiscoveryPlugin)(nil).UpdateUpstream), arg0, arg1) } @@ -109,7 +105,7 @@ func (m *MockDiscoveryPlugin) WatchEndpoints(arg0 string, arg1 v1.UpstreamList, } // WatchEndpoints indicates an expected call of WatchEndpoints. -func (mr *MockDiscoveryPluginMockRecorder) WatchEndpoints(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockDiscoveryPluginMockRecorder) WatchEndpoints(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchEndpoints", reflect.TypeOf((*MockDiscoveryPlugin)(nil).WatchEndpoints), arg0, arg1, arg2) } diff --git a/projects/gloo/pkg/mocks/mock_artifact_client.go b/projects/gloo/pkg/mocks/mock_artifact_client.go index 848d0827019..57e61f94b8e 100644 --- a/projects/gloo/pkg/mocks/mock_artifact_client.go +++ b/projects/gloo/pkg/mocks/mock_artifact_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockArtifactClient is a mock of ArtifactClient interface diff --git a/projects/gloo/pkg/mocks/mock_endpoint_client.go b/projects/gloo/pkg/mocks/mock_endpoint_client.go index 5cf7a312d3d..66f25fb545a 100644 --- a/projects/gloo/pkg/mocks/mock_endpoint_client.go +++ b/projects/gloo/pkg/mocks/mock_endpoint_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockEndpointClient is a mock of EndpointClient interface diff --git a/projects/gloo/pkg/mocks/mock_proxy_client.go b/projects/gloo/pkg/mocks/mock_proxy_client.go index f0c97c27807..7572798f1a0 100644 --- a/projects/gloo/pkg/mocks/mock_proxy_client.go +++ b/projects/gloo/pkg/mocks/mock_proxy_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockProxyClient is a mock of ProxyClient interface diff --git a/projects/gloo/pkg/mocks/mock_secret_client.go b/projects/gloo/pkg/mocks/mock_secret_client.go index 90a0a2129aa..0fcd27b2299 100644 --- a/projects/gloo/pkg/mocks/mock_secret_client.go +++ b/projects/gloo/pkg/mocks/mock_secret_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockSecretClient is a mock of SecretClient interface diff --git a/projects/gloo/pkg/mocks/mock_settings_client.go b/projects/gloo/pkg/mocks/mock_settings_client.go index f301b816b49..dbca0e1a67a 100644 --- a/projects/gloo/pkg/mocks/mock_settings_client.go +++ b/projects/gloo/pkg/mocks/mock_settings_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockSettingsClient is a mock of SettingsClient interface diff --git a/projects/gloo/pkg/mocks/mock_upstream_client.go b/projects/gloo/pkg/mocks/mock_upstream_client.go index 224c435e12a..6ac387cdf44 100644 --- a/projects/gloo/pkg/mocks/mock_upstream_client.go +++ b/projects/gloo/pkg/mocks/mock_upstream_client.go @@ -7,9 +7,9 @@ package mocks import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" clients "github.com/solo-io/solo-kit/pkg/api/v1/clients" - gomock "go.uber.org/mock/gomock" ) // MockUpstreamClient is a mock of UpstreamClient interface diff --git a/projects/gloo/pkg/plugins/consul/eds_test.go b/projects/gloo/pkg/plugins/consul/eds_test.go index ebf226ef576..ca8ab033358 100644 --- a/projects/gloo/pkg/plugins/consul/eds_test.go +++ b/projects/gloo/pkg/plugins/consul/eds_test.go @@ -23,6 +23,7 @@ import ( . "github.com/solo-io/gloo/projects/gloo/constants" + "github.com/golang/mock/gomock" consulapi "github.com/hashicorp/consul/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -33,7 +34,6 @@ import ( . "github.com/solo-io/gloo/test/gomega" "github.com/solo-io/solo-kit/pkg/api/v1/clients" "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" - "go.uber.org/mock/gomock" "golang.org/x/sync/errgroup" ) diff --git a/projects/gloo/pkg/plugins/consul/mocks/dnsresolver_mock.go b/projects/gloo/pkg/plugins/consul/mocks/dnsresolver_mock.go index 1e89e004e9c..c04f4959d89 100644 --- a/projects/gloo/pkg/plugins/consul/mocks/dnsresolver_mock.go +++ b/projects/gloo/pkg/plugins/consul/mocks/dnsresolver_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/pkg/plugins/consul (interfaces: DnsResolver) -// -// Generated by this command: -// -// mockgen -destination ./mocks/dnsresolver_mock.go github.com/solo-io/gloo/projects/gloo/pkg/plugins/consul DnsResolver -// + // Package mock_consul is a generated GoMock package. package mock_consul @@ -13,7 +9,7 @@ import ( net "net" reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" ) // MockDnsResolver is a mock of DnsResolver interface. @@ -49,7 +45,7 @@ func (m *MockDnsResolver) Resolve(arg0 context.Context, arg1 string) ([]net.IPAd } // Resolve indicates an expected call of Resolve. -func (mr *MockDnsResolverMockRecorder) Resolve(arg0, arg1 any) *gomock.Call { +func (mr *MockDnsResolverMockRecorder) Resolve(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockDnsResolver)(nil).Resolve), arg0, arg1) } diff --git a/projects/gloo/pkg/plugins/consul/plugin_test.go b/projects/gloo/pkg/plugins/consul/plugin_test.go index ecc9c0fede5..3004be2b48a 100644 --- a/projects/gloo/pkg/plugins/consul/plugin_test.go +++ b/projects/gloo/pkg/plugins/consul/plugin_test.go @@ -10,11 +10,11 @@ import ( mock_consul2 "github.com/solo-io/gloo/projects/gloo/pkg/plugins/consul/mocks" + "github.com/golang/mock/gomock" consulapi "github.com/hashicorp/consul/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" mock_consul "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul/mocks" - "go.uber.org/mock/gomock" ) var _ = Describe("Resolve", func() { diff --git a/projects/gloo/pkg/plugins/kubernetes/eds_test.go b/projects/gloo/pkg/plugins/kubernetes/eds_test.go index 8be83b89a7b..976682c3804 100644 --- a/projects/gloo/pkg/plugins/kubernetes/eds_test.go +++ b/projects/gloo/pkg/plugins/kubernetes/eds_test.go @@ -4,6 +4,7 @@ import ( "context" "os" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/solo-io/gloo/pkg/utils/settingsutil" @@ -12,7 +13,6 @@ import ( mock_kubernetes "github.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes/mocks" mock_cache "github.com/solo-io/gloo/test/mocks/cache" "github.com/solo-io/solo-kit/pkg/api/v1/clients" - "go.uber.org/mock/gomock" ) var _ = Describe("Eds", func() { diff --git a/projects/gloo/pkg/plugins/kubernetes/mocks/kubesharedfactory_mock.go b/projects/gloo/pkg/plugins/kubernetes/mocks/kubesharedfactory_mock.go index d8d9363499b..1a26307ed1b 100644 --- a/projects/gloo/pkg/plugins/kubernetes/mocks/kubesharedfactory_mock.go +++ b/projects/gloo/pkg/plugins/kubernetes/mocks/kubesharedfactory_mock.go @@ -1,17 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes (interfaces: KubePluginSharedFactory) -// -// Generated by this command: -// -// mockgen -destination ./mocks/kubesharedfactory_mock.go github.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes KubePluginSharedFactory -// + // Package mock_kubernetes is a generated GoMock package. package mock_kubernetes import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" v1 "k8s.io/client-go/listers/core/v1" ) @@ -47,7 +43,7 @@ func (m *MockKubePluginSharedFactory) EndpointsLister(arg0 string) v1.EndpointsL } // EndpointsLister indicates an expected call of EndpointsLister. -func (mr *MockKubePluginSharedFactoryMockRecorder) EndpointsLister(arg0 any) *gomock.Call { +func (mr *MockKubePluginSharedFactoryMockRecorder) EndpointsLister(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndpointsLister", reflect.TypeOf((*MockKubePluginSharedFactory)(nil).EndpointsLister), arg0) } @@ -73,7 +69,7 @@ func (m *MockKubePluginSharedFactory) Unsubscribe(arg0 <-chan struct{}) { } // Unsubscribe indicates an expected call of Unsubscribe. -func (mr *MockKubePluginSharedFactoryMockRecorder) Unsubscribe(arg0 any) *gomock.Call { +func (mr *MockKubePluginSharedFactoryMockRecorder) Unsubscribe(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockKubePluginSharedFactory)(nil).Unsubscribe), arg0) } diff --git a/projects/gloo/pkg/plugins/tcp/plugin_test.go b/projects/gloo/pkg/plugins/tcp/plugin_test.go index dc75ddcb6ab..b3ccb57e1a9 100644 --- a/projects/gloo/pkg/plugins/tcp/plugin_test.go +++ b/projects/gloo/pkg/plugins/tcp/plugin_test.go @@ -8,6 +8,7 @@ import ( envoy_extensions_filters_network_sni_cluster_v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_cluster/v3" envoytcp "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3" envoyauth "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" + "github.com/golang/mock/gomock" "github.com/golang/protobuf/ptypes/duration" "github.com/golang/protobuf/ptypes/empty" "github.com/golang/protobuf/ptypes/wrappers" @@ -25,7 +26,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" "github.com/solo-io/solo-kit/pkg/utils/prototime" "github.com/solo-io/solo-kit/test/matchers" - "go.uber.org/mock/gomock" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/wrapperspb" ) diff --git a/projects/gloo/pkg/translator/performance_test.go b/projects/gloo/pkg/translator/performance_test.go index 1e9156273c7..3ce44c676c2 100644 --- a/projects/gloo/pkg/translator/performance_test.go +++ b/projects/gloo/pkg/translator/performance_test.go @@ -15,6 +15,7 @@ import ( "github.com/onsi/gomega/types" "github.com/solo-io/gloo/test/gomega/matchers" + "github.com/golang/mock/gomock" "github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/validation" "github.com/solo-io/gloo/projects/gloo/pkg/bootstrap" "github.com/solo-io/gloo/projects/gloo/pkg/plugins/registry" @@ -25,7 +26,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/clients/memory" "github.com/solo-io/solo-kit/pkg/api/v1/control-plane/cache" "github.com/solo-io/solo-kit/pkg/api/v2/reporter" - "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/projects/gloo/pkg/translator/translator_test.go b/projects/gloo/pkg/translator/translator_test.go index 1cb2103c99f..51f186fd2c8 100644 --- a/projects/gloo/pkg/translator/translator_test.go +++ b/projects/gloo/pkg/translator/translator_test.go @@ -32,11 +32,11 @@ import ( envoyauth "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" envoy_type_matcher_v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" envoy_type_v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3" + "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/duration" structpb "github.com/golang/protobuf/ptypes/struct" "github.com/golang/protobuf/ptypes/wrappers" - "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/projects/gloo/pkg/upstreams/consul/consul_client_test.go b/projects/gloo/pkg/upstreams/consul/consul_client_test.go index a3f77cdace3..d8d98a6c9e6 100644 --- a/projects/gloo/pkg/upstreams/consul/consul_client_test.go +++ b/projects/gloo/pkg/upstreams/consul/consul_client_test.go @@ -3,12 +3,12 @@ package consul_test import ( "context" + "github.com/golang/mock/gomock" "github.com/hashicorp/consul/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul" mock_consul "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul/mocks" - "go.uber.org/mock/gomock" ) var _ = Describe("ClientWrapper", func() { diff --git a/projects/gloo/pkg/upstreams/consul/mocks/mock_consul_client.go b/projects/gloo/pkg/upstreams/consul/mocks/mock_consul_client.go index 39fddee2a29..330892092f5 100644 --- a/projects/gloo/pkg/upstreams/consul/mocks/mock_consul_client.go +++ b/projects/gloo/pkg/upstreams/consul/mocks/mock_consul_client.go @@ -1,18 +1,14 @@ // Code generated by MockGen. DO NOT EDIT. // Source: consul_client.go -// -// Generated by this command: -// -// mockgen -destination=./mocks/mock_consul_client.go -source consul_client.go -// + // Package mock_consul is a generated GoMock package. package mock_consul import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" api "github.com/hashicorp/consul/api" - gomock "go.uber.org/mock/gomock" ) // MockClientWrapper is a mock of ClientWrapper interface. @@ -49,7 +45,7 @@ func (m *MockClientWrapper) Connect(service, tag string, q *api.QueryOptions) ([ } // Connect indicates an expected call of Connect. -func (mr *MockClientWrapperMockRecorder) Connect(service, tag, q any) *gomock.Call { +func (mr *MockClientWrapperMockRecorder) Connect(service, tag, q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockClientWrapper)(nil).Connect), service, tag, q) } @@ -80,7 +76,7 @@ func (m *MockClientWrapper) Service(service, tag string, q *api.QueryOptions) ([ } // Service indicates an expected call of Service. -func (mr *MockClientWrapperMockRecorder) Service(service, tag, q any) *gomock.Call { +func (mr *MockClientWrapperMockRecorder) Service(service, tag, q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Service", reflect.TypeOf((*MockClientWrapper)(nil).Service), service, tag, q) } @@ -96,7 +92,7 @@ func (m *MockClientWrapper) Services(q *api.QueryOptions) (map[string][]string, } // Services indicates an expected call of Services. -func (mr *MockClientWrapperMockRecorder) Services(q any) *gomock.Call { +func (mr *MockClientWrapperMockRecorder) Services(q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Services", reflect.TypeOf((*MockClientWrapper)(nil).Services), q) } diff --git a/projects/gloo/pkg/upstreams/consul/mocks/mock_watcher.go b/projects/gloo/pkg/upstreams/consul/mocks/mock_watcher.go index 713981d090b..5f7ee5e4857 100644 --- a/projects/gloo/pkg/upstreams/consul/mocks/mock_watcher.go +++ b/projects/gloo/pkg/upstreams/consul/mocks/mock_watcher.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: watcher.go -// -// Generated by this command: -// -// mockgen -destination ./mocks/mock_watcher.go -source watcher.go -aux_files github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul=./consul_client.go -// + // Package mock_consul is a generated GoMock package. package mock_consul @@ -12,10 +8,10 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" api "github.com/hashicorp/consul/api" consul "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/consul" consul0 "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul" - gomock "go.uber.org/mock/gomock" ) // MockConsulWatcher is a mock of ConsulWatcher interface. @@ -52,7 +48,7 @@ func (m *MockConsulWatcher) Connect(service, tag string, q *api.QueryOptions) ([ } // Connect indicates an expected call of Connect. -func (mr *MockConsulWatcherMockRecorder) Connect(service, tag, q any) *gomock.Call { +func (mr *MockConsulWatcherMockRecorder) Connect(service, tag, q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockConsulWatcher)(nil).Connect), service, tag, q) } @@ -83,7 +79,7 @@ func (m *MockConsulWatcher) Service(service, tag string, q *api.QueryOptions) ([ } // Service indicates an expected call of Service. -func (mr *MockConsulWatcherMockRecorder) Service(service, tag, q any) *gomock.Call { +func (mr *MockConsulWatcherMockRecorder) Service(service, tag, q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Service", reflect.TypeOf((*MockConsulWatcher)(nil).Service), service, tag, q) } @@ -99,7 +95,7 @@ func (m *MockConsulWatcher) Services(q *api.QueryOptions) (map[string][]string, } // Services indicates an expected call of Services. -func (mr *MockConsulWatcherMockRecorder) Services(q any) *gomock.Call { +func (mr *MockConsulWatcherMockRecorder) Services(q interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Services", reflect.TypeOf((*MockConsulWatcher)(nil).Services), q) } @@ -114,7 +110,7 @@ func (m *MockConsulWatcher) WatchServices(ctx context.Context, dataCenters []str } // WatchServices indicates an expected call of WatchServices. -func (mr *MockConsulWatcherMockRecorder) WatchServices(ctx, dataCenters, cm, queryOpts any) *gomock.Call { +func (mr *MockConsulWatcherMockRecorder) WatchServices(ctx, dataCenters, cm, queryOpts interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WatchServices", reflect.TypeOf((*MockConsulWatcher)(nil).WatchServices), ctx, dataCenters, cm, queryOpts) } diff --git a/projects/gloo/pkg/upstreams/consul/upstream_client_test.go b/projects/gloo/pkg/upstreams/consul/upstream_client_test.go index 1bcef47d979..dc67b968457 100644 --- a/projects/gloo/pkg/upstreams/consul/upstream_client_test.go +++ b/projects/gloo/pkg/upstreams/consul/upstream_client_test.go @@ -9,11 +9,11 @@ import ( "github.com/solo-io/gloo/projects/gloo/pkg/defaults" + "github.com/golang/mock/gomock" consulapi "github.com/hashicorp/consul/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/solo-io/gloo/test/gomega" - "go.uber.org/mock/gomock" "github.com/rotisserie/eris" . "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul" diff --git a/projects/gloo/pkg/upstreams/hybrid_client_test.go b/projects/gloo/pkg/upstreams/hybrid_client_test.go index 830a898e58d..c5d3ace8d4c 100644 --- a/projects/gloo/pkg/upstreams/hybrid_client_test.go +++ b/projects/gloo/pkg/upstreams/hybrid_client_test.go @@ -8,6 +8,7 @@ import ( "github.com/rotisserie/eris" mock_consul "github.com/solo-io/gloo/projects/gloo/pkg/upstreams/consul/mocks" + "github.com/golang/mock/gomock" "github.com/hashicorp/consul/api" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -19,7 +20,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/clients/factory" "github.com/solo-io/solo-kit/pkg/api/v1/clients/memory" skkube "github.com/solo-io/solo-kit/pkg/api/v1/resources/common/kubernetes" - "go.uber.org/mock/gomock" ) var _ = Describe("Hybrid Upstream Client", func() { diff --git a/projects/gloo/pkg/utils/mocks/mock_ssl.go b/projects/gloo/pkg/utils/mocks/mock_ssl.go index 46849256594..c63ee8022a4 100644 --- a/projects/gloo/pkg/utils/mocks/mock_ssl.go +++ b/projects/gloo/pkg/utils/mocks/mock_ssl.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/pkg/utils (interfaces: SslConfigTranslator) -// -// Generated by this command: -// -// mockgen -destination mocks/mock_ssl.go github.com/solo-io/gloo/projects/gloo/pkg/utils SslConfigTranslator -// + // Package mock_utils is a generated GoMock package. package mock_utils @@ -12,10 +8,10 @@ import ( reflect "reflect" tlsv3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" + gomock "github.com/golang/mock/gomock" v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" ssl "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/ssl" utils "github.com/solo-io/gloo/projects/gloo/pkg/utils" - gomock "go.uber.org/mock/gomock" ) // MockSslConfigTranslator is a mock of SslConfigTranslator interface. @@ -51,7 +47,7 @@ func (m *MockSslConfigTranslator) ResolveCommonSslConfig(arg0 utils.CertSource, } // ResolveCommonSslConfig indicates an expected call of ResolveCommonSslConfig. -func (mr *MockSslConfigTranslatorMockRecorder) ResolveCommonSslConfig(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockSslConfigTranslatorMockRecorder) ResolveCommonSslConfig(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveCommonSslConfig", reflect.TypeOf((*MockSslConfigTranslator)(nil).ResolveCommonSslConfig), arg0, arg1, arg2) } @@ -66,7 +62,7 @@ func (m *MockSslConfigTranslator) ResolveDownstreamSslConfig(arg0 v1.SecretList, } // ResolveDownstreamSslConfig indicates an expected call of ResolveDownstreamSslConfig. -func (mr *MockSslConfigTranslatorMockRecorder) ResolveDownstreamSslConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockSslConfigTranslatorMockRecorder) ResolveDownstreamSslConfig(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveDownstreamSslConfig", reflect.TypeOf((*MockSslConfigTranslator)(nil).ResolveDownstreamSslConfig), arg0, arg1) } @@ -81,7 +77,7 @@ func (m *MockSslConfigTranslator) ResolveSslParamsConfig(arg0 *ssl.SslParameters } // ResolveSslParamsConfig indicates an expected call of ResolveSslParamsConfig. -func (mr *MockSslConfigTranslatorMockRecorder) ResolveSslParamsConfig(arg0 any) *gomock.Call { +func (mr *MockSslConfigTranslatorMockRecorder) ResolveSslParamsConfig(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveSslParamsConfig", reflect.TypeOf((*MockSslConfigTranslator)(nil).ResolveSslParamsConfig), arg0) } @@ -96,7 +92,7 @@ func (m *MockSslConfigTranslator) ResolveUpstreamSslConfig(arg0 v1.SecretList, a } // ResolveUpstreamSslConfig indicates an expected call of ResolveUpstreamSslConfig. -func (mr *MockSslConfigTranslatorMockRecorder) ResolveUpstreamSslConfig(arg0, arg1 any) *gomock.Call { +func (mr *MockSslConfigTranslatorMockRecorder) ResolveUpstreamSslConfig(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveUpstreamSslConfig", reflect.TypeOf((*MockSslConfigTranslator)(nil).ResolveUpstreamSslConfig), arg0, arg1) } diff --git a/projects/gloo/pkg/validation/server_test.go b/projects/gloo/pkg/validation/server_test.go index 0822bda1bd7..40117537d0a 100644 --- a/projects/gloo/pkg/validation/server_test.go +++ b/projects/gloo/pkg/validation/server_test.go @@ -11,6 +11,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ratelimit "github.com/solo-io/gloo/projects/gloo/pkg/api/external/solo/ratelimit" @@ -33,7 +34,6 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" "github.com/solo-io/solo-kit/pkg/api/v2/reporter" "github.com/solo-io/solo-kit/test/matchers" - "go.uber.org/mock/gomock" "google.golang.org/grpc" ) diff --git a/test/mocks/cache/corecache.go b/test/mocks/cache/corecache.go index e25a3a8b242..58748e768e9 100644 --- a/test/mocks/cache/corecache.go +++ b/test/mocks/cache/corecache.go @@ -1,18 +1,14 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/solo-kit/pkg/api/v1/clients/kube/cache (interfaces: KubeCoreCache) -// -// Generated by this command: -// -// mockgen -destination ./cache/corecache.go github.com/solo-io/solo-kit/pkg/api/v1/clients/kube/cache KubeCoreCache -// + // Package mock_cache is a generated GoMock package. package mock_cache import ( reflect "reflect" + gomock "github.com/golang/mock/gomock" cache "github.com/solo-io/solo-kit/pkg/api/v1/clients/kube/cache" - gomock "go.uber.org/mock/gomock" v1 "k8s.io/client-go/listers/core/v1" ) @@ -76,7 +72,7 @@ func (m *MockKubeCoreCache) NamespacedConfigMapLister(arg0 string) cache.ConfigM } // NamespacedConfigMapLister indicates an expected call of NamespacedConfigMapLister. -func (mr *MockKubeCoreCacheMockRecorder) NamespacedConfigMapLister(arg0 any) *gomock.Call { +func (mr *MockKubeCoreCacheMockRecorder) NamespacedConfigMapLister(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespacedConfigMapLister", reflect.TypeOf((*MockKubeCoreCache)(nil).NamespacedConfigMapLister), arg0) } @@ -90,7 +86,7 @@ func (m *MockKubeCoreCache) NamespacedPodLister(arg0 string) cache.PodLister { } // NamespacedPodLister indicates an expected call of NamespacedPodLister. -func (mr *MockKubeCoreCacheMockRecorder) NamespacedPodLister(arg0 any) *gomock.Call { +func (mr *MockKubeCoreCacheMockRecorder) NamespacedPodLister(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespacedPodLister", reflect.TypeOf((*MockKubeCoreCache)(nil).NamespacedPodLister), arg0) } @@ -104,7 +100,7 @@ func (m *MockKubeCoreCache) NamespacedSecretLister(arg0 string) cache.SecretList } // NamespacedSecretLister indicates an expected call of NamespacedSecretLister. -func (mr *MockKubeCoreCacheMockRecorder) NamespacedSecretLister(arg0 any) *gomock.Call { +func (mr *MockKubeCoreCacheMockRecorder) NamespacedSecretLister(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespacedSecretLister", reflect.TypeOf((*MockKubeCoreCache)(nil).NamespacedSecretLister), arg0) } @@ -118,7 +114,7 @@ func (m *MockKubeCoreCache) NamespacedServiceLister(arg0 string) cache.ServiceLi } // NamespacedServiceLister indicates an expected call of NamespacedServiceLister. -func (mr *MockKubeCoreCacheMockRecorder) NamespacedServiceLister(arg0 any) *gomock.Call { +func (mr *MockKubeCoreCacheMockRecorder) NamespacedServiceLister(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NamespacedServiceLister", reflect.TypeOf((*MockKubeCoreCache)(nil).NamespacedServiceLister), arg0) } @@ -186,7 +182,7 @@ func (m *MockKubeCoreCache) Unsubscribe(arg0 <-chan struct{}) { } // Unsubscribe indicates an expected call of Unsubscribe. -func (mr *MockKubeCoreCacheMockRecorder) Unsubscribe(arg0 any) *gomock.Call { +func (mr *MockKubeCoreCacheMockRecorder) Unsubscribe(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockKubeCoreCache)(nil).Unsubscribe), arg0) } diff --git a/test/mocks/gloo/validation_client.go b/test/mocks/gloo/validation_client.go index f512d1a2a57..74f4a4bce9e 100644 --- a/test/mocks/gloo/validation_client.go +++ b/test/mocks/gloo/validation_client.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/validation (interfaces: GlooValidationServiceClient) -// -// Generated by this command: -// -// mockgen -destination ./gloo/validation_client.go github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/validation GlooValidationServiceClient -// + // Package mock_validation is a generated GoMock package. package mock_validation @@ -12,8 +8,8 @@ import ( context "context" reflect "reflect" + gomock "github.com/golang/mock/gomock" validation "github.com/solo-io/gloo/projects/gloo/pkg/api/grpc/validation" - gomock "go.uber.org/mock/gomock" grpc "google.golang.org/grpc" ) @@ -43,7 +39,7 @@ func (m *MockGlooValidationServiceClient) EXPECT() *MockGlooValidationServiceCli // NotifyOnResync mocks base method. func (m *MockGlooValidationServiceClient) NotifyOnResync(arg0 context.Context, arg1 *validation.NotifyOnResyncRequest, arg2 ...grpc.CallOption) (validation.GlooValidationService_NotifyOnResyncClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} + varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) } @@ -54,16 +50,16 @@ func (m *MockGlooValidationServiceClient) NotifyOnResync(arg0 context.Context, a } // NotifyOnResync indicates an expected call of NotifyOnResync. -func (mr *MockGlooValidationServiceClientMockRecorder) NotifyOnResync(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockGlooValidationServiceClientMockRecorder) NotifyOnResync(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyOnResync", reflect.TypeOf((*MockGlooValidationServiceClient)(nil).NotifyOnResync), varargs...) } // Validate mocks base method. func (m *MockGlooValidationServiceClient) Validate(arg0 context.Context, arg1 *validation.GlooValidationServiceRequest, arg2 ...grpc.CallOption) (*validation.GlooValidationServiceResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} + varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) } @@ -74,8 +70,8 @@ func (m *MockGlooValidationServiceClient) Validate(arg0 context.Context, arg1 *v } // Validate indicates an expected call of Validate. -func (mr *MockGlooValidationServiceClientMockRecorder) Validate(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockGlooValidationServiceClientMockRecorder) Validate(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockGlooValidationServiceClient)(nil).Validate), varargs...) } diff --git a/test/mocks/kubernetes/kubeinterface.go b/test/mocks/kubernetes/kubeinterface.go index 958ef9c5a51..5bc26fc0913 100644 --- a/test/mocks/kubernetes/kubeinterface.go +++ b/test/mocks/kubernetes/kubeinterface.go @@ -1,17 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. // Source: k8s.io/client-go/kubernetes (interfaces: Interface) -// -// Generated by this command: -// -// mockgen -destination ./kubernetes/kubeinterface.go k8s.io/client-go/kubernetes Interface -// + // Package mock_kubernetes is a generated GoMock package. package mock_kubernetes import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" + gomock "github.com/golang/mock/gomock" discovery "k8s.io/client-go/discovery" v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1"