From a3c7415bd6f6c48035e77ffdbdc3c6ca562939a7 Mon Sep 17 00:00:00 2001 From: Tomasz Janiszewski Date: Fri, 2 Aug 2024 19:55:23 +0200 Subject: [PATCH] chore(deps): replace deprecated mockgen Co-authored-by: Hank Donnay Signed-off-by: Tomasz Janiszewski --- Makefile | 3 +- go.mod | 2 +- go.sum | 12 +---- indexer/controller/checkmanifest_test.go | 2 +- indexer/controller/controller_test.go | 2 +- indexer/controller/indexfinished_test.go | 2 +- indexer/controller/indexmanifest_test.go | 2 +- indexer/controller/scanlayers_test.go | 2 +- libindex/libindex_integration_test.go | 2 +- libindex/libindex_test.go | 2 +- test/mock/driver/generate.go | 2 +- test/mock/driver/mocks.go | 11 ++-- test/mock/indexer/generate.go | 2 +- test/mock/indexer/mocks.go | 65 +++++++++++++----------- test/mock/updater/driver/v1/generate.go | 2 +- test/mock/updater/driver/v1/mocks.go | 15 ++++-- test/mock/updater/generate.go | 2 +- test/mock/updater/mocks.go | 13 +++-- tools.go | 2 +- updater/offline_test.go | 2 +- updater/updater_test.go | 2 +- 21 files changed, 80 insertions(+), 69 deletions(-) diff --git a/Makefile b/Makefile index b9c24bcee..981819cbc 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,7 @@ clear-cache: # generates mocks of interfaces for testing .PHONY: genmocks genmocks: - @command -v mockgen >/dev/null || go install github.com/golang/mock/mockgen - go generate ./... + go generate -run mockgen ./... # Runs integration tests. An embedded postgres binary will be fetched if the # environment variable "POSTGRES_CONNECTION_STRING" isn't set. diff --git a/go.mod b/go.mod index 8b1450a2d..cc37a8ff3 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.21.8 require ( github.com/Masterminds/semver v1.5.0 github.com/doug-martin/goqu/v8 v8.6.0 - github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/jackc/pgconn v1.14.3 @@ -25,6 +24,7 @@ require ( github.com/ulikunitz/xz v0.5.11 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/trace v1.28.0 + go.uber.org/mock v0.4.0 golang.org/x/crypto v0.25.0 golang.org/x/sync v0.8.0 golang.org/x/sys v0.23.0 diff --git a/go.sum b/go.sum index 88ce7db6f..cf3a4be70 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -182,7 +180,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= @@ -194,6 +191,8 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -216,7 +215,6 @@ golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -225,9 +223,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -242,8 +238,6 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -271,9 +265,7 @@ golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190924052046-3ac2a5bbd98a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/indexer/controller/checkmanifest_test.go b/indexer/controller/checkmanifest_test.go index 12c93011f..e67547bfe 100644 --- a/indexer/controller/checkmanifest_test.go +++ b/indexer/controller/checkmanifest_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" "github.com/quay/claircore" indexer "github.com/quay/claircore/test/mock/indexer" diff --git a/indexer/controller/controller_test.go b/indexer/controller/controller_test.go index bcf2d6f74..99499a275 100644 --- a/indexer/controller/controller_test.go +++ b/indexer/controller/controller_test.go @@ -6,9 +6,9 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/quay/zlog" + "go.uber.org/mock/gomock" "github.com/quay/claircore" indexer "github.com/quay/claircore/test/mock/indexer" diff --git a/indexer/controller/indexfinished_test.go b/indexer/controller/indexfinished_test.go index d2aed5d69..83da52819 100644 --- a/indexer/controller/indexfinished_test.go +++ b/indexer/controller/indexfinished_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" indexer "github.com/quay/claircore/test/mock/indexer" ) diff --git a/indexer/controller/indexmanifest_test.go b/indexer/controller/indexmanifest_test.go index 79ded31ac..1bd40b577 100644 --- a/indexer/controller/indexmanifest_test.go +++ b/indexer/controller/indexmanifest_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" indexer "github.com/quay/claircore/test/mock/indexer" ) diff --git a/indexer/controller/scanlayers_test.go b/indexer/controller/scanlayers_test.go index 6fced3832..a359b5365 100644 --- a/indexer/controller/scanlayers_test.go +++ b/indexer/controller/scanlayers_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" "github.com/quay/claircore" "github.com/quay/claircore/indexer" diff --git a/libindex/libindex_integration_test.go b/libindex/libindex_integration_test.go index 7001b3d4d..ced02cb7e 100644 --- a/libindex/libindex_integration_test.go +++ b/libindex/libindex_integration_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" "github.com/jackc/pgx/v4/pgxpool" "github.com/quay/zlog" + "go.uber.org/mock/gomock" "github.com/quay/claircore" "github.com/quay/claircore/datastore/postgres" diff --git a/libindex/libindex_test.go b/libindex/libindex_test.go index 7d4ba375d..3e85b69a5 100644 --- a/libindex/libindex_test.go +++ b/libindex/libindex_test.go @@ -8,8 +8,8 @@ import ( "strconv" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" "github.com/quay/claircore" indexer "github.com/quay/claircore/test/mock/indexer" diff --git a/test/mock/driver/generate.go b/test/mock/driver/generate.go index b56991bc8..c775c4ae6 100644 --- a/test/mock/driver/generate.go +++ b/test/mock/driver/generate.go @@ -1,4 +1,4 @@ package mock_driver -//go:generate -command mockgen go run github.com/golang/mock/mockgen -destination=./mocks.go github.com/quay/claircore/libvuln/driver +//go:generate -command mockgen go run go.uber.org/mock/mockgen -destination=./mocks.go github.com/quay/claircore/libvuln/driver //go:generate mockgen Matcher diff --git a/test/mock/driver/mocks.go b/test/mock/driver/mocks.go index 9a1540d2a..81bc79821 100644 --- a/test/mock/driver/mocks.go +++ b/test/mock/driver/mocks.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/quay/claircore/libvuln/driver (interfaces: Matcher) +// +// Generated by this command: +// +// mockgen -destination=./mocks.go github.com/quay/claircore/libvuln/driver Matcher +// // Package mock_driver is a generated GoMock package. package mock_driver @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" claircore "github.com/quay/claircore" driver "github.com/quay/claircore/libvuln/driver" + gomock "go.uber.org/mock/gomock" ) // MockMatcher is a mock of Matcher interface. @@ -45,7 +50,7 @@ func (m *MockMatcher) Filter(arg0 *claircore.IndexRecord) bool { } // Filter indicates an expected call of Filter. -func (mr *MockMatcherMockRecorder) Filter(arg0 interface{}) *gomock.Call { +func (mr *MockMatcherMockRecorder) Filter(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockMatcher)(nil).Filter), arg0) } @@ -88,7 +93,7 @@ func (m *MockMatcher) Vulnerable(arg0 context.Context, arg1 *claircore.IndexReco } // Vulnerable indicates an expected call of Vulnerable. -func (mr *MockMatcherMockRecorder) Vulnerable(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockMatcherMockRecorder) Vulnerable(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Vulnerable", reflect.TypeOf((*MockMatcher)(nil).Vulnerable), arg0, arg1, arg2) } diff --git a/test/mock/indexer/generate.go b/test/mock/indexer/generate.go index 509e13e0c..2478a1867 100644 --- a/test/mock/indexer/generate.go +++ b/test/mock/indexer/generate.go @@ -1,4 +1,4 @@ package mock_indexer -//go:generate -command mockgen go run github.com/golang/mock/mockgen -destination=./mocks.go github.com/quay/claircore/indexer +//go:generate -command mockgen go run go.uber.org/mock/mockgen -destination=./mocks.go github.com/quay/claircore/indexer //go:generate mockgen Store,PackageScanner,VersionedScanner,DistributionScanner,RepositoryScanner,Coalescer,Realizer,FetchArena diff --git a/test/mock/indexer/mocks.go b/test/mock/indexer/mocks.go index eb6197ae5..59b61f738 100644 --- a/test/mock/indexer/mocks.go +++ b/test/mock/indexer/mocks.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/quay/claircore/indexer (interfaces: Store,PackageScanner,VersionedScanner,DistributionScanner,RepositoryScanner,Coalescer,Realizer,FetchArena) +// +// Generated by this command: +// +// mockgen -destination=./mocks.go github.com/quay/claircore/indexer Store,PackageScanner,VersionedScanner,DistributionScanner,RepositoryScanner,Coalescer,Realizer,FetchArena +// // Package mock_indexer is a generated GoMock package. package mock_indexer @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" claircore "github.com/quay/claircore" indexer "github.com/quay/claircore/indexer" + gomock "go.uber.org/mock/gomock" ) // MockStore is a mock of Store interface. @@ -46,7 +51,7 @@ func (m *MockStore) AffectedManifests(arg0 context.Context, arg1 claircore.Vulne } // AffectedManifests indicates an expected call of AffectedManifests. -func (mr *MockStoreMockRecorder) AffectedManifests(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) AffectedManifests(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AffectedManifests", reflect.TypeOf((*MockStore)(nil).AffectedManifests), arg0, arg1, arg2) } @@ -60,7 +65,7 @@ func (m *MockStore) Close(arg0 context.Context) error { } // Close indicates an expected call of Close. -func (mr *MockStoreMockRecorder) Close(arg0 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) Close(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStore)(nil).Close), arg0) } @@ -68,7 +73,7 @@ func (mr *MockStoreMockRecorder) Close(arg0 interface{}) *gomock.Call { // DeleteManifests mocks base method. func (m *MockStore) DeleteManifests(arg0 context.Context, arg1 ...claircore.Digest) ([]claircore.Digest, error) { m.ctrl.T.Helper() - varargs := []interface{}{arg0} + varargs := []any{arg0} for _, a := range arg1 { varargs = append(varargs, a) } @@ -79,9 +84,9 @@ func (m *MockStore) DeleteManifests(arg0 context.Context, arg1 ...claircore.Dige } // DeleteManifests indicates an expected call of DeleteManifests. -func (mr *MockStoreMockRecorder) DeleteManifests(arg0 interface{}, arg1 ...interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) DeleteManifests(arg0 any, arg1 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0}, arg1...) + varargs := append([]any{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteManifests", reflect.TypeOf((*MockStore)(nil).DeleteManifests), varargs...) } @@ -95,7 +100,7 @@ func (m *MockStore) DistributionsByLayer(arg0 context.Context, arg1 claircore.Di } // DistributionsByLayer indicates an expected call of DistributionsByLayer. -func (mr *MockStoreMockRecorder) DistributionsByLayer(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) DistributionsByLayer(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DistributionsByLayer", reflect.TypeOf((*MockStore)(nil).DistributionsByLayer), arg0, arg1, arg2) } @@ -110,7 +115,7 @@ func (m *MockStore) FilesByLayer(arg0 context.Context, arg1 claircore.Digest, ar } // FilesByLayer indicates an expected call of FilesByLayer. -func (mr *MockStoreMockRecorder) FilesByLayer(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) FilesByLayer(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilesByLayer", reflect.TypeOf((*MockStore)(nil).FilesByLayer), arg0, arg1, arg2) } @@ -124,7 +129,7 @@ func (m *MockStore) IndexDistributions(arg0 context.Context, arg1 []*claircore.D } // IndexDistributions indicates an expected call of IndexDistributions. -func (mr *MockStoreMockRecorder) IndexDistributions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexDistributions(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexDistributions", reflect.TypeOf((*MockStore)(nil).IndexDistributions), arg0, arg1, arg2, arg3) } @@ -138,7 +143,7 @@ func (m *MockStore) IndexFiles(arg0 context.Context, arg1 []claircore.File, arg2 } // IndexFiles indicates an expected call of IndexFiles. -func (mr *MockStoreMockRecorder) IndexFiles(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexFiles(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexFiles", reflect.TypeOf((*MockStore)(nil).IndexFiles), arg0, arg1, arg2, arg3) } @@ -152,7 +157,7 @@ func (m *MockStore) IndexManifest(arg0 context.Context, arg1 *claircore.IndexRep } // IndexManifest indicates an expected call of IndexManifest. -func (mr *MockStoreMockRecorder) IndexManifest(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexManifest(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexManifest", reflect.TypeOf((*MockStore)(nil).IndexManifest), arg0, arg1) } @@ -166,7 +171,7 @@ func (m *MockStore) IndexPackages(arg0 context.Context, arg1 []*claircore.Packag } // IndexPackages indicates an expected call of IndexPackages. -func (mr *MockStoreMockRecorder) IndexPackages(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexPackages(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexPackages", reflect.TypeOf((*MockStore)(nil).IndexPackages), arg0, arg1, arg2, arg3) } @@ -182,7 +187,7 @@ func (m *MockStore) IndexReport(arg0 context.Context, arg1 claircore.Digest) (*c } // IndexReport indicates an expected call of IndexReport. -func (mr *MockStoreMockRecorder) IndexReport(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexReport(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexReport", reflect.TypeOf((*MockStore)(nil).IndexReport), arg0, arg1) } @@ -196,7 +201,7 @@ func (m *MockStore) IndexRepositories(arg0 context.Context, arg1 []*claircore.Re } // IndexRepositories indicates an expected call of IndexRepositories. -func (mr *MockStoreMockRecorder) IndexRepositories(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) IndexRepositories(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexRepositories", reflect.TypeOf((*MockStore)(nil).IndexRepositories), arg0, arg1, arg2, arg3) } @@ -211,7 +216,7 @@ func (m *MockStore) LayerScanned(arg0 context.Context, arg1 claircore.Digest, ar } // LayerScanned indicates an expected call of LayerScanned. -func (mr *MockStoreMockRecorder) LayerScanned(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) LayerScanned(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerScanned", reflect.TypeOf((*MockStore)(nil).LayerScanned), arg0, arg1, arg2) } @@ -226,7 +231,7 @@ func (m *MockStore) ManifestScanned(arg0 context.Context, arg1 claircore.Digest, } // ManifestScanned indicates an expected call of ManifestScanned. -func (mr *MockStoreMockRecorder) ManifestScanned(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) ManifestScanned(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestScanned", reflect.TypeOf((*MockStore)(nil).ManifestScanned), arg0, arg1, arg2) } @@ -241,7 +246,7 @@ func (m *MockStore) PackagesByLayer(arg0 context.Context, arg1 claircore.Digest, } // PackagesByLayer indicates an expected call of PackagesByLayer. -func (mr *MockStoreMockRecorder) PackagesByLayer(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) PackagesByLayer(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackagesByLayer", reflect.TypeOf((*MockStore)(nil).PackagesByLayer), arg0, arg1, arg2) } @@ -255,7 +260,7 @@ func (m *MockStore) PersistManifest(arg0 context.Context, arg1 claircore.Manifes } // PersistManifest indicates an expected call of PersistManifest. -func (mr *MockStoreMockRecorder) PersistManifest(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) PersistManifest(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PersistManifest", reflect.TypeOf((*MockStore)(nil).PersistManifest), arg0, arg1) } @@ -269,7 +274,7 @@ func (m *MockStore) RegisterScanners(arg0 context.Context, arg1 indexer.Versione } // RegisterScanners indicates an expected call of RegisterScanners. -func (mr *MockStoreMockRecorder) RegisterScanners(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) RegisterScanners(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterScanners", reflect.TypeOf((*MockStore)(nil).RegisterScanners), arg0, arg1) } @@ -284,7 +289,7 @@ func (m *MockStore) RepositoriesByLayer(arg0 context.Context, arg1 claircore.Dig } // RepositoriesByLayer indicates an expected call of RepositoriesByLayer. -func (mr *MockStoreMockRecorder) RepositoriesByLayer(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) RepositoriesByLayer(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RepositoriesByLayer", reflect.TypeOf((*MockStore)(nil).RepositoriesByLayer), arg0, arg1, arg2) } @@ -298,7 +303,7 @@ func (m *MockStore) SetIndexFinished(arg0 context.Context, arg1 *claircore.Index } // SetIndexFinished indicates an expected call of SetIndexFinished. -func (mr *MockStoreMockRecorder) SetIndexFinished(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) SetIndexFinished(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIndexFinished", reflect.TypeOf((*MockStore)(nil).SetIndexFinished), arg0, arg1, arg2) } @@ -312,7 +317,7 @@ func (m *MockStore) SetIndexReport(arg0 context.Context, arg1 *claircore.IndexRe } // SetIndexReport indicates an expected call of SetIndexReport. -func (mr *MockStoreMockRecorder) SetIndexReport(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) SetIndexReport(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIndexReport", reflect.TypeOf((*MockStore)(nil).SetIndexReport), arg0, arg1) } @@ -326,7 +331,7 @@ func (m *MockStore) SetLayerScanned(arg0 context.Context, arg1 claircore.Digest, } // SetLayerScanned indicates an expected call of SetLayerScanned. -func (mr *MockStoreMockRecorder) SetLayerScanned(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) SetLayerScanned(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLayerScanned", reflect.TypeOf((*MockStore)(nil).SetLayerScanned), arg0, arg1, arg2) } @@ -392,7 +397,7 @@ func (m *MockPackageScanner) Scan(arg0 context.Context, arg1 *claircore.Layer) ( } // Scan indicates an expected call of Scan. -func (mr *MockPackageScannerMockRecorder) Scan(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockPackageScannerMockRecorder) Scan(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockPackageScanner)(nil).Scan), arg0, arg1) } @@ -537,7 +542,7 @@ func (m *MockDistributionScanner) Scan(arg0 context.Context, arg1 *claircore.Lay } // Scan indicates an expected call of Scan. -func (mr *MockDistributionScannerMockRecorder) Scan(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDistributionScannerMockRecorder) Scan(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockDistributionScanner)(nil).Scan), arg0, arg1) } @@ -617,7 +622,7 @@ func (m *MockRepositoryScanner) Scan(arg0 context.Context, arg1 *claircore.Layer } // Scan indicates an expected call of Scan. -func (mr *MockRepositoryScannerMockRecorder) Scan(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRepositoryScannerMockRecorder) Scan(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockRepositoryScanner)(nil).Scan), arg0, arg1) } @@ -669,7 +674,7 @@ func (m *MockCoalescer) Coalesce(arg0 context.Context, arg1 []*indexer.LayerArti } // Coalesce indicates an expected call of Coalesce. -func (mr *MockCoalescerMockRecorder) Coalesce(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockCoalescerMockRecorder) Coalesce(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Coalesce", reflect.TypeOf((*MockCoalescer)(nil).Coalesce), arg0, arg1) } @@ -720,7 +725,7 @@ func (m *MockRealizer) Realize(arg0 context.Context, arg1 []*claircore.Layer) er } // Realize indicates an expected call of Realize. -func (mr *MockRealizerMockRecorder) Realize(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockRealizerMockRecorder) Realize(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Realize", reflect.TypeOf((*MockRealizer)(nil).Realize), arg0, arg1) } @@ -757,7 +762,7 @@ func (m *MockFetchArena) Close(arg0 context.Context) error { } // Close indicates an expected call of Close. -func (mr *MockFetchArenaMockRecorder) Close(arg0 interface{}) *gomock.Call { +func (mr *MockFetchArenaMockRecorder) Close(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockFetchArena)(nil).Close), arg0) } @@ -771,7 +776,7 @@ func (m *MockFetchArena) Realizer(arg0 context.Context) indexer.Realizer { } // Realizer indicates an expected call of Realizer. -func (mr *MockFetchArenaMockRecorder) Realizer(arg0 interface{}) *gomock.Call { +func (mr *MockFetchArenaMockRecorder) Realizer(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Realizer", reflect.TypeOf((*MockFetchArena)(nil).Realizer), arg0) } diff --git a/test/mock/updater/driver/v1/generate.go b/test/mock/updater/driver/v1/generate.go index bb82a8548..877bfbd91 100644 --- a/test/mock/updater/driver/v1/generate.go +++ b/test/mock/updater/driver/v1/generate.go @@ -1,4 +1,4 @@ package mock_driver -//go:generate -command mockgen go run github.com/golang/mock/mockgen -package=$GOPACKAGE -destination=./mocks.go github.com/quay/claircore/updater/driver/v1 +//go:generate -command mockgen go run go.uber.org/mock/mockgen -package=$GOPACKAGE -destination=./mocks.go github.com/quay/claircore/updater/driver/v1 //go:generate mockgen Updater,UpdaterFactory,VulnerabilityParser,EnrichmentParser diff --git a/test/mock/updater/driver/v1/mocks.go b/test/mock/updater/driver/v1/mocks.go index e63e80d64..8ffa5d5ed 100644 --- a/test/mock/updater/driver/v1/mocks.go +++ b/test/mock/updater/driver/v1/mocks.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/quay/claircore/updater/driver/v1 (interfaces: Updater,UpdaterFactory,VulnerabilityParser,EnrichmentParser) +// +// Generated by this command: +// +// mockgen -package=mock_driver -destination=./mocks.go github.com/quay/claircore/updater/driver/v1 Updater,UpdaterFactory,VulnerabilityParser,EnrichmentParser +// // Package mock_driver is a generated GoMock package. package mock_driver @@ -11,8 +16,8 @@ import ( http "net/http" reflect "reflect" - gomock "github.com/golang/mock/gomock" driver "github.com/quay/claircore/updater/driver/v1" + gomock "go.uber.org/mock/gomock" ) // MockUpdater is a mock of Updater interface. @@ -48,7 +53,7 @@ func (m *MockUpdater) Fetch(arg0 context.Context, arg1 *zip.Writer, arg2 driver. } // Fetch indicates an expected call of Fetch. -func (mr *MockUpdaterMockRecorder) Fetch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockUpdaterMockRecorder) Fetch(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Fetch", reflect.TypeOf((*MockUpdater)(nil).Fetch), arg0, arg1, arg2, arg3) } @@ -100,7 +105,7 @@ func (m *MockUpdaterFactory) Create(arg0 context.Context, arg1 driver.ConfigUnma } // Create indicates an expected call of Create. -func (mr *MockUpdaterFactoryMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockUpdaterFactoryMockRecorder) Create(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUpdaterFactory)(nil).Create), arg0, arg1) } @@ -152,7 +157,7 @@ func (m *MockVulnerabilityParser) ParseVulnerability(arg0 context.Context, arg1 } // ParseVulnerability indicates an expected call of ParseVulnerability. -func (mr *MockVulnerabilityParserMockRecorder) ParseVulnerability(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockVulnerabilityParserMockRecorder) ParseVulnerability(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseVulnerability", reflect.TypeOf((*MockVulnerabilityParser)(nil).ParseVulnerability), arg0, arg1) } @@ -190,7 +195,7 @@ func (m *MockEnrichmentParser) ParseEnrichment(arg0 context.Context, arg1 fs.FS) } // ParseEnrichment indicates an expected call of ParseEnrichment. -func (mr *MockEnrichmentParserMockRecorder) ParseEnrichment(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockEnrichmentParserMockRecorder) ParseEnrichment(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseEnrichment", reflect.TypeOf((*MockEnrichmentParser)(nil).ParseEnrichment), arg0, arg1) } diff --git a/test/mock/updater/generate.go b/test/mock/updater/generate.go index 64aafed34..3e0878f36 100644 --- a/test/mock/updater/generate.go +++ b/test/mock/updater/generate.go @@ -1,4 +1,4 @@ package mock_updater -//go:generate -command mockgen go run github.com/golang/mock/mockgen -package=$GOPACKAGE -destination=./mocks.go github.com/quay/claircore/updater +//go:generate -command mockgen go run go.uber.org/mock/mockgen -package=$GOPACKAGE -destination=./mocks.go github.com/quay/claircore/updater //go:generate mockgen Store diff --git a/test/mock/updater/mocks.go b/test/mock/updater/mocks.go index b83028911..592b8e8e5 100644 --- a/test/mock/updater/mocks.go +++ b/test/mock/updater/mocks.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/quay/claircore/updater (interfaces: Store) +// +// Generated by this command: +// +// mockgen -package=mock_updater -destination=./mocks.go github.com/quay/claircore/updater Store +// // Package mock_updater is a generated GoMock package. package mock_updater @@ -8,9 +13,9 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" uuid "github.com/google/uuid" driver "github.com/quay/claircore/updater/driver/v1" + gomock "go.uber.org/mock/gomock" ) // MockStore is a mock of Store interface. @@ -46,7 +51,7 @@ func (m *MockStore) GetLatestUpdateOperations(arg0 context.Context) ([]driver.Up } // GetLatestUpdateOperations indicates an expected call of GetLatestUpdateOperations. -func (mr *MockStoreMockRecorder) GetLatestUpdateOperations(arg0 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetLatestUpdateOperations(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestUpdateOperations", reflect.TypeOf((*MockStore)(nil).GetLatestUpdateOperations), arg0) } @@ -60,7 +65,7 @@ func (m *MockStore) UpdateEnrichments(arg0 context.Context, arg1 uuid.UUID, arg2 } // UpdateEnrichments indicates an expected call of UpdateEnrichments. -func (mr *MockStoreMockRecorder) UpdateEnrichments(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateEnrichments(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEnrichments", reflect.TypeOf((*MockStore)(nil).UpdateEnrichments), arg0, arg1, arg2, arg3, arg4) } @@ -74,7 +79,7 @@ func (m *MockStore) UpdateVulnerabilities(arg0 context.Context, arg1 uuid.UUID, } // UpdateVulnerabilities indicates an expected call of UpdateVulnerabilities. -func (mr *MockStoreMockRecorder) UpdateVulnerabilities(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateVulnerabilities(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVulnerabilities", reflect.TypeOf((*MockStore)(nil).UpdateVulnerabilities), arg0, arg1, arg2, arg3, arg4) } diff --git a/tools.go b/tools.go index 30d2cfb50..0d674deb9 100644 --- a/tools.go +++ b/tools.go @@ -3,7 +3,7 @@ package claircore import ( - _ "github.com/golang/mock/mockgen" + _ "go.uber.org/mock/mockgen" _ "golang.org/x/tools/cmd/file2fuzz" _ "golang.org/x/tools/cmd/stringer" ) diff --git a/updater/offline_test.go b/updater/offline_test.go index e3d903e21..0d1ed83ee 100644 --- a/updater/offline_test.go +++ b/updater/offline_test.go @@ -13,8 +13,8 @@ import ( "path/filepath" "testing" - "github.com/golang/mock/gomock" "github.com/quay/zlog" + "go.uber.org/mock/gomock" mock_updater "github.com/quay/claircore/test/mock/updater" mock_driver "github.com/quay/claircore/test/mock/updater/driver/v1" diff --git a/updater/updater_test.go b/updater/updater_test.go index 1dbe11bca..44e4a57cb 100644 --- a/updater/updater_test.go +++ b/updater/updater_test.go @@ -14,9 +14,9 @@ import ( "reflect" "testing" - "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/quay/zlog" + "go.uber.org/mock/gomock" mock_updater "github.com/quay/claircore/test/mock/updater" mock_driver "github.com/quay/claircore/test/mock/updater/driver/v1"