diff --git a/Makefile b/Makefile index d98cb8db696..da855c56bce 100644 --- a/Makefile +++ b/Makefile @@ -325,7 +325,7 @@ gen_apis: lint_apis MOCKERY_IMAGENAME=$(IMAGENAMESPACE)/mockery -MOCKERY_VERSION=v2.14.0 +MOCKERY_VERSION=v2.22.1 MOCKERY=$(RUNCONTAINER) ${MOCKERY_IMAGENAME}:${MOCKERY_VERSION} MOCKERY_IMAGE_BUILD_CMD=${DOCKERBUILD} -f ${TOOLSPATH}/mockery/Dockerfile --build-arg GOLANG=${GOBUILDIMAGE} --build-arg MOCKERY_VERSION=${MOCKERY_VERSION} -t ${MOCKERY_IMAGENAME}:$(MOCKERY_VERSION) . diff --git a/src/controller/replication/flow/mock_adapter_factory_test.go b/src/controller/replication/flow/mock_adapter_factory_test.go index 1aedc23d9c2..f86ceee8a58 100644 --- a/src/controller/replication/flow/mock_adapter_factory_test.go +++ b/src/controller/replication/flow/mock_adapter_factory_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package flow @@ -35,6 +35,10 @@ func (_m *mockFactory) Create(_a0 *model.Registry) (adapter.Adapter, error) { ret := _m.Called(_a0) var r0 adapter.Adapter + var r1 error + if rf, ok := ret.Get(0).(func(*model.Registry) (adapter.Adapter, error)); ok { + return rf(_a0) + } if rf, ok := ret.Get(0).(func(*model.Registry) adapter.Adapter); ok { r0 = rf(_a0) } else { @@ -43,7 +47,6 @@ func (_m *mockFactory) Create(_a0 *model.Registry) (adapter.Adapter, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(*model.Registry) error); ok { r1 = rf(_a0) } else { diff --git a/src/controller/replication/flow/mock_adapter_test.go b/src/controller/replication/flow/mock_adapter_test.go index c522c6eb09b..be7675ef201 100644 --- a/src/controller/replication/flow/mock_adapter_test.go +++ b/src/controller/replication/flow/mock_adapter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package flow @@ -22,13 +22,16 @@ func (_m *mockAdapter) BlobExist(repository string, digest string) (bool, error) ret := _m.Called(repository, digest) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { + return rf(repository, digest) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(repository, digest) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(string, string) error); ok { r1 = rf(repository, digest) } else { @@ -43,20 +46,23 @@ func (_m *mockAdapter) CanBeMount(digest string) (bool, string, error) { ret := _m.Called(digest) var r0 bool + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok { + return rf(digest) + } if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(digest) } else { r0 = ret.Get(0).(bool) } - var r1 string if rf, ok := ret.Get(1).(func(string) string); ok { r1 = rf(digest) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(string) error); ok { r2 = rf(digest) } else { @@ -99,6 +105,10 @@ func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resourc ret := _m.Called(filters) var r0 []*model.Resource + var r1 error + if rf, ok := ret.Get(0).(func([]*model.Filter) ([]*model.Resource, error)); ok { + return rf(filters) + } if rf, ok := ret.Get(0).(func([]*model.Filter) []*model.Resource); ok { r0 = rf(filters) } else { @@ -107,7 +117,6 @@ func (_m *mockAdapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resourc } } - var r1 error if rf, ok := ret.Get(1).(func([]*model.Filter) error); ok { r1 = rf(filters) } else { @@ -122,13 +131,16 @@ func (_m *mockAdapter) HealthCheck() (string, error) { ret := _m.Called() var r0 string + var r1 error + if rf, ok := ret.Get(0).(func() (string, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -143,6 +155,10 @@ func (_m *mockAdapter) Info() (*model.RegistryInfo, error) { ret := _m.Called() var r0 *model.RegistryInfo + var r1 error + if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok { r0 = rf() } else { @@ -151,7 +167,6 @@ func (_m *mockAdapter) Info() (*model.RegistryInfo, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -166,6 +181,10 @@ func (_m *mockAdapter) ListTags(repository string) ([]string, error) { ret := _m.Called(repository) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { + return rf(repository) + } if rf, ok := ret.Get(0).(func(string) []string); ok { r0 = rf(repository) } else { @@ -174,7 +193,6 @@ func (_m *mockAdapter) ListTags(repository string) ([]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(repository) } else { @@ -189,13 +207,17 @@ func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool, ret := _m.Called(repository, reference) var r0 bool + var r1 *distribution.Descriptor + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok { + return rf(repository, reference) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(repository, reference) } else { r0 = ret.Get(0).(bool) } - var r1 *distribution.Descriptor if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { r1 = rf(repository, reference) } else { @@ -204,7 +226,6 @@ func (_m *mockAdapter) ManifestExist(repository string, reference string) (bool, } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repository, reference) } else { @@ -247,13 +268,17 @@ func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.Rea ret := _m.Called(repository, digest) var r0 int64 + var r1 io.ReadCloser + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok { + return rf(repository, digest) + } if rf, ok := ret.Get(0).(func(string, string) int64); ok { r0 = rf(repository, digest) } else { r0 = ret.Get(0).(int64) } - var r1 io.ReadCloser if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { r1 = rf(repository, digest) } else { @@ -262,7 +287,6 @@ func (_m *mockAdapter) PullBlob(repository string, digest string) (int64, io.Rea } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repository, digest) } else { @@ -277,13 +301,17 @@ func (_m *mockAdapter) PullBlobChunk(repository string, digest string, blobSize ret := _m.Called(repository, digest, blobSize, start, end) var r0 int64 + var r1 io.ReadCloser + var r2 error + if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) (int64, io.ReadCloser, error)); ok { + return rf(repository, digest, blobSize, start, end) + } if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok { r0 = rf(repository, digest, blobSize, start, end) } else { r0 = ret.Get(0).(int64) } - var r1 io.ReadCloser if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok { r1 = rf(repository, digest, blobSize, start, end) } else { @@ -292,7 +320,6 @@ func (_m *mockAdapter) PullBlobChunk(repository string, digest string, blobSize } } - var r2 error if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok { r2 = rf(repository, digest, blobSize, start, end) } else { @@ -314,6 +341,11 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt ret := _m.Called(_ca...) var r0 distribution.Manifest + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(string, string, ...string) (distribution.Manifest, string, error)); ok { + return rf(repository, reference, accepttedMediaTypes...) + } if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok { r0 = rf(repository, reference, accepttedMediaTypes...) } else { @@ -322,14 +354,12 @@ func (_m *mockAdapter) PullManifest(repository string, reference string, acceptt } } - var r1 string if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok { r1 = rf(repository, reference, accepttedMediaTypes...) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok { r2 = rf(repository, reference, accepttedMediaTypes...) } else { @@ -358,20 +388,23 @@ func (_m *mockAdapter) PushBlobChunk(repository string, digest string, size int6 ret := _m.Called(repository, digest, size, chunk, start, end, location) var r0 string + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) (string, int64, error)); ok { + return rf(repository, digest, size, chunk, start, end, location) + } if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok { r0 = rf(repository, digest, size, chunk, start, end, location) } else { r0 = ret.Get(0).(string) } - var r1 int64 if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok { r1 = rf(repository, digest, size, chunk, start, end, location) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok { r2 = rf(repository, digest, size, chunk, start, end, location) } else { @@ -386,13 +419,16 @@ func (_m *mockAdapter) PushManifest(repository string, reference string, mediaTy ret := _m.Called(repository, reference, mediaType, payload) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok { + return rf(repository, reference, mediaType, payload) + } if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok { r0 = rf(repository, reference, mediaType, payload) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok { r1 = rf(repository, reference, mediaType, payload) } else { diff --git a/src/controller/replication/mock_flow_controller_test.go b/src/controller/replication/mock_flow_controller_test.go index 7c8305b948e..d144ee6d2ae 100644 --- a/src/controller/replication/mock_flow_controller_test.go +++ b/src/controller/replication/mock_flow_controller_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package replication diff --git a/src/jobservice/mgt/mock_manager.go b/src/jobservice/mgt/mock_manager.go index cf523079bd1..b01e4e46b1d 100644 --- a/src/jobservice/mgt/mock_manager.go +++ b/src/jobservice/mgt/mock_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mgt @@ -19,6 +19,10 @@ func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) { ret := _m.Called(jobID) var r0 *job.Stats + var r1 error + if rf, ok := ret.Get(0).(func(string) (*job.Stats, error)); ok { + return rf(jobID) + } if rf, ok := ret.Get(0).(func(string) *job.Stats); ok { r0 = rf(jobID) } else { @@ -27,7 +31,6 @@ func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(jobID) } else { @@ -42,6 +45,11 @@ func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error) ret := _m.Called(q) var r0 []*job.Stats + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok { + return rf(q) + } if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok { r0 = rf(q) } else { @@ -50,14 +58,12 @@ func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error) } } - var r1 int64 if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok { r1 = rf(q) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok { r2 = rf(q) } else { @@ -72,6 +78,11 @@ func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]* ret := _m.Called(pID, q) var r0 []*job.Stats + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(string, *query.Parameter) ([]*job.Stats, int64, error)); ok { + return rf(pID, q) + } if rf, ok := ret.Get(0).(func(string, *query.Parameter) []*job.Stats); ok { r0 = rf(pID, q) } else { @@ -80,14 +91,12 @@ func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]* } } - var r1 int64 if rf, ok := ret.Get(1).(func(string, *query.Parameter) int64); ok { r1 = rf(pID, q) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(string, *query.Parameter) error); ok { r2 = rf(pID, q) } else { @@ -102,6 +111,11 @@ func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64 ret := _m.Called(q) var r0 []*job.Stats + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok { + return rf(q) + } if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok { r0 = rf(q) } else { @@ -110,14 +124,12 @@ func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64 } } - var r1 int64 if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok { r1 = rf(q) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok { r2 = rf(q) } else { diff --git a/src/jobservice/period/mock_scheduler.go b/src/jobservice/period/mock_scheduler.go index b0b19cae6c8..51439fa0897 100644 --- a/src/jobservice/period/mock_scheduler.go +++ b/src/jobservice/period/mock_scheduler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package period @@ -14,13 +14,16 @@ func (_m *MockScheduler) Schedule(policy *Policy) (int64, error) { ret := _m.Called(policy) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(*Policy) (int64, error)); ok { + return rf(policy) + } if rf, ok := ret.Get(0).(func(*Policy) int64); ok { r0 = rf(policy) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(*Policy) error); ok { r1 = rf(policy) } else { diff --git a/src/pkg/scheduler/mock_dao_test.go b/src/pkg/scheduler/mock_dao_test.go index 64886e5833d..6347469353b 100644 --- a/src/pkg/scheduler/mock_dao_test.go +++ b/src/pkg/scheduler/mock_dao_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scheduler @@ -19,13 +19,16 @@ func (_m *mockDAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -40,13 +43,16 @@ func (_m *mockDAO) Create(ctx context.Context, s *schedule) (int64, error) { ret := _m.Called(ctx, s) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *schedule) (int64, error)); ok { + return rf(ctx, s) + } if rf, ok := ret.Get(0).(func(context.Context, *schedule) int64); ok { r0 = rf(ctx, s) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *schedule) error); ok { r1 = rf(ctx, s) } else { @@ -75,6 +81,10 @@ func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) { ret := _m.Called(ctx, id) var r0 *schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*schedule, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *schedule); ok { r0 = rf(ctx, id) } else { @@ -83,7 +93,6 @@ func (_m *mockDAO) Get(ctx context.Context, id int64) (*schedule, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -98,6 +107,10 @@ func (_m *mockDAO) List(ctx context.Context, query *q.Query) ([]*schedule, error ret := _m.Called(ctx, query) var r0 []*schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*schedule, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*schedule); ok { r0 = rf(ctx, query) } else { @@ -106,7 +119,6 @@ func (_m *mockDAO) List(ctx context.Context, query *q.Query) ([]*schedule, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -142,13 +154,16 @@ func (_m *mockDAO) UpdateRevision(ctx context.Context, id int64, revision int64) ret := _m.Called(ctx, id, revision) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok { + return rf(ctx, id, revision) + } if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok { r0 = rf(ctx, id, revision) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { r1 = rf(ctx, id, revision) } else { diff --git a/src/pkg/task/mock_execution_dao_test.go b/src/pkg/task/mock_execution_dao_test.go index 8cc981980fd..6f242145546 100644 --- a/src/pkg/task/mock_execution_dao_test.go +++ b/src/pkg/task/mock_execution_dao_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -21,13 +21,16 @@ func (_m *mockExecutionDAO) Count(ctx context.Context, query *q.Query) (int64, e ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *mockExecutionDAO) Create(ctx context.Context, execution *dao.Execution ret := _m.Called(ctx, execution) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) (int64, error)); ok { + return rf(ctx, execution) + } if rf, ok := ret.Get(0).(func(context.Context, *dao.Execution) int64); ok { r0 = rf(ctx, execution) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *dao.Execution) error); ok { r1 = rf(ctx, execution) } else { @@ -77,6 +83,10 @@ func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution, ret := _m.Called(ctx, id) var r0 *dao.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Execution, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Execution); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *mockExecutionDAO) Get(ctx context.Context, id int64) (*dao.Execution, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metr ret := _m.Called(ctx, id) var r0 *dao.Metrics + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Metrics, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Metrics); ok { r0 = rf(ctx, id) } else { @@ -108,7 +121,6 @@ func (_m *mockExecutionDAO) GetMetrics(ctx context.Context, id int64) (*dao.Metr } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -123,6 +135,10 @@ func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Ex ret := _m.Called(ctx, query) var r0 []*dao.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Execution, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Execution); ok { r0 = rf(ctx, query) } else { @@ -131,7 +147,6 @@ func (_m *mockExecutionDAO) List(ctx context.Context, query *q.Query) ([]*dao.Ex } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -146,20 +161,23 @@ func (_m *mockExecutionDAO) RefreshStatus(ctx context.Context, id int64) (bool, ret := _m.Called(ctx, id) var r0 bool + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (bool, string, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) bool); ok { r0 = rf(ctx, id) } else { r0 = ret.Get(0).(bool) } - var r1 string if rf, ok := ret.Get(1).(func(context.Context, int64) string); ok { r1 = rf(ctx, id) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, int64) error); ok { r2 = rf(ctx, id) } else { diff --git a/src/pkg/task/mock_jobservice_client_test.go b/src/pkg/task/mock_jobservice_client_test.go index 27b0b9059bb..5f6aed737e7 100644 --- a/src/pkg/task/mock_jobservice_client_test.go +++ b/src/pkg/task/mock_jobservice_client_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -19,6 +19,10 @@ func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error) ret := _m.Called(uuid) var r0 []job.Stats + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]job.Stats, error)); ok { + return rf(uuid) + } if rf, ok := ret.Get(0).(func(string) []job.Stats); ok { r0 = rf(uuid) } else { @@ -27,7 +31,6 @@ func (_m *mockJobserviceClient) GetExecutions(uuid string) ([]job.Stats, error) } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(uuid) } else { @@ -42,6 +45,10 @@ func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) { ret := _m.Called(uuid) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok { + return rf(uuid) + } if rf, ok := ret.Get(0).(func(string) []byte); ok { r0 = rf(uuid) } else { @@ -50,7 +57,6 @@ func (_m *mockJobserviceClient) GetJobLog(uuid string) ([]byte, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(uuid) } else { @@ -65,6 +71,10 @@ func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) { ret := _m.Called() var r0 *job.Config + var r1 error + if rf, ok := ret.Get(0).(func() (*job.Config, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() *job.Config); ok { r0 = rf() } else { @@ -73,7 +83,6 @@ func (_m *mockJobserviceClient) GetJobServiceConfig() (*job.Config, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -102,13 +111,16 @@ func (_m *mockJobserviceClient) SubmitJob(_a0 *models.JobData) (string, error) { ret := _m.Called(_a0) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(*models.JobData) (string, error)); ok { + return rf(_a0) + } if rf, ok := ret.Get(0).(func(*models.JobData) string); ok { r0 = rf(_a0) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(*models.JobData) error); ok { r1 = rf(_a0) } else { diff --git a/src/pkg/task/mock_task_dao_test.go b/src/pkg/task/mock_task_dao_test.go index eee80da9cfe..2ba7e33c65c 100644 --- a/src/pkg/task/mock_task_dao_test.go +++ b/src/pkg/task/mock_task_dao_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -23,13 +23,16 @@ func (_m *mockTaskDAO) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -44,13 +47,16 @@ func (_m *mockTaskDAO) Create(ctx context.Context, _a1 *dao.Task) (int64, error) ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *dao.Task) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *dao.Task) error); ok { r1 = rf(ctx, _a1) } else { @@ -79,6 +85,10 @@ func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendor ret := _m.Called(ctx, vendorType, status) var r0 []int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok { + return rf(ctx, vendorType, status) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { r0 = rf(ctx, vendorType, status) } else { @@ -87,7 +97,6 @@ func (_m *mockTaskDAO) ExecutionIDsByVendorAndStatus(ctx context.Context, vendor } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, vendorType, status) } else { @@ -102,6 +111,10 @@ func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) { ret := _m.Called(ctx, id) var r0 *dao.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Task, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Task); ok { r0 = rf(ctx, id) } else { @@ -110,7 +123,6 @@ func (_m *mockTaskDAO) Get(ctx context.Context, id int64) (*dao.Task, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -125,13 +137,16 @@ func (_m *mockTaskDAO) GetMaxEndTime(ctx context.Context, executionID int64) (ti ret := _m.Called(ctx, executionID) var r0 time.Time + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (time.Time, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) time.Time); ok { r0 = rf(ctx, executionID) } else { r0 = ret.Get(0).(time.Time) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { @@ -146,6 +161,10 @@ func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, e ret := _m.Called(ctx, query) var r0 []*dao.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Task, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Task); ok { r0 = rf(ctx, query) } else { @@ -154,7 +173,6 @@ func (_m *mockTaskDAO) List(ctx context.Context, query *q.Query) ([]*dao.Task, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -169,6 +187,10 @@ func (_m *mockTaskDAO) ListStatusCount(ctx context.Context, executionID int64) ( ret := _m.Called(ctx, executionID) var r0 []*dao.StatusCount + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*dao.StatusCount, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []*dao.StatusCount); ok { r0 = rf(ctx, executionID) } else { @@ -177,7 +199,6 @@ func (_m *mockTaskDAO) ListStatusCount(ctx context.Context, executionID int64) ( } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { diff --git a/src/pkg/task/mock_task_manager_test.go b/src/pkg/task/mock_task_manager_test.go index 21b16b2fbda..916d5ea0045 100644 --- a/src/pkg/task/mock_task_manager_test.go +++ b/src/pkg/task/mock_task_manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -19,13 +19,16 @@ func (_m *mockTaskManager) Count(ctx context.Context, query *q.Query) (int64, er ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -47,13 +50,16 @@ func (_m *mockTaskManager) Create(ctx context.Context, executionID int64, job *J ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) (int64, error)); ok { + return rf(ctx, executionID, job, extraAttrs...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *Job, ...map[string]interface{}) int64); ok { r0 = rf(ctx, executionID, job, extraAttrs...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *Job, ...map[string]interface{}) error); ok { r1 = rf(ctx, executionID, job, extraAttrs...) } else { @@ -68,6 +74,10 @@ func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, ve ret := _m.Called(ctx, vendorType, status) var r0 []int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok { + return rf(ctx, vendorType, status) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { r0 = rf(ctx, vendorType, status) } else { @@ -76,7 +86,6 @@ func (_m *mockTaskManager) ExecutionIDsByVendorAndStatus(ctx context.Context, ve } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, vendorType, status) } else { @@ -91,6 +100,10 @@ func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) { ret := _m.Called(ctx, id) var r0 *Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*Task, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *Task); ok { r0 = rf(ctx, id) } else { @@ -99,7 +112,6 @@ func (_m *mockTaskManager) Get(ctx context.Context, id int64) (*Task, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -114,6 +126,10 @@ func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error) ret := _m.Called(ctx, id) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, id) } else { @@ -122,7 +138,6 @@ func (_m *mockTaskManager) GetLog(ctx context.Context, id int64) ([]byte, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -137,6 +152,10 @@ func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]b ret := _m.Called(ctx, jobID) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { + return rf(ctx, jobID) + } if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { r0 = rf(ctx, jobID) } else { @@ -145,7 +164,6 @@ func (_m *mockTaskManager) GetLogByJobID(ctx context.Context, jobID string) ([]b } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, jobID) } else { @@ -160,6 +178,10 @@ func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, e ret := _m.Called(ctx, query) var r0 []*Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*Task, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*Task); ok { r0 = rf(ctx, query) } else { @@ -168,7 +190,6 @@ func (_m *mockTaskManager) List(ctx context.Context, query *q.Query) ([]*Task, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/common/security/context.go b/src/testing/common/security/context.go index fb26f2cb54b..8add7af059a 100644 --- a/src/testing/common/security/context.go +++ b/src/testing/common/security/context.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package security diff --git a/src/testing/controller/artifact/controller.go b/src/testing/controller/artifact/controller.go index 9b5ff2e3389..e1222bcdf9e 100644 --- a/src/testing/controller/artifact/controller.go +++ b/src/testing/controller/artifact/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package artifact @@ -40,13 +40,16 @@ func (_m *Controller) Copy(ctx context.Context, srcRepo string, reference string ret := _m.Called(ctx, srcRepo, reference, dstRepo) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (int64, error)); ok { + return rf(ctx, srcRepo, reference, dstRepo) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, string) int64); ok { r0 = rf(ctx, srcRepo, reference, dstRepo) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { r1 = rf(ctx, srcRepo, reference, dstRepo) } else { @@ -61,13 +64,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -96,20 +102,23 @@ func (_m *Controller) Ensure(ctx context.Context, repository string, digest stri ret := _m.Called(ctx, repository, digest, option) var r0 bool + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.ArtOption) (bool, int64, error)); ok { + return rf(ctx, repository, digest, option) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.ArtOption) bool); ok { r0 = rf(ctx, repository, digest, option) } else { r0 = ret.Get(0).(bool) } - var r1 int64 if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.ArtOption) int64); ok { r1 = rf(ctx, repository, digest, option) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string, string, *artifact.ArtOption) error); ok { r2 = rf(ctx, repository, digest, option) } else { @@ -124,6 +133,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option ret := _m.Called(ctx, id, option) var r0 *artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) (*artifact.Artifact, error)); ok { + return rf(ctx, id, option) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *artifact.Option) *artifact.Artifact); ok { r0 = rf(ctx, id, option) } else { @@ -132,7 +145,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *artifact.Option } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *artifact.Option) error); ok { r1 = rf(ctx, id, option) } else { @@ -147,6 +159,10 @@ func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additio ret := _m.Called(ctx, artifactID, additionType) var r0 *processor.Addition + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*processor.Addition, error)); ok { + return rf(ctx, artifactID, additionType) + } if rf, ok := ret.Get(0).(func(context.Context, int64, string) *processor.Addition); ok { r0 = rf(ctx, artifactID, additionType) } else { @@ -155,7 +171,6 @@ func (_m *Controller) GetAddition(ctx context.Context, artifactID int64, additio } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { r1 = rf(ctx, artifactID, additionType) } else { @@ -170,6 +185,10 @@ func (_m *Controller) GetByReference(ctx context.Context, repository string, ref ret := _m.Called(ctx, repository, reference, option) var r0 *artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) (*artifact.Artifact, error)); ok { + return rf(ctx, repository, reference, option) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, *artifact.Option) *artifact.Artifact); ok { r0 = rf(ctx, repository, reference, option) } else { @@ -178,7 +197,6 @@ func (_m *Controller) GetByReference(ctx context.Context, repository string, ref } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, *artifact.Option) error); ok { r1 = rf(ctx, repository, reference, option) } else { @@ -193,6 +211,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact ret := _m.Called(ctx, query, option) var r0 []*artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) ([]*artifact.Artifact, error)); ok { + return rf(ctx, query, option) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *artifact.Option) []*artifact.Artifact); ok { r0 = rf(ctx, query, option) } else { @@ -201,7 +223,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *artifact } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *artifact.Option) error); ok { r1 = rf(ctx, query, option) } else { diff --git a/src/testing/controller/blob/controller.go b/src/testing/controller/blob/controller.go index baf7d4d9fe5..4a8ce2e10ba 100644 --- a/src/testing/controller/blob/controller.go +++ b/src/testing/controller/blob/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package blob @@ -68,13 +68,16 @@ func (_m *Controller) CalculateTotalSize(ctx context.Context, excludeForeign boo ret := _m.Called(ctx, excludeForeign) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok { + return rf(ctx, excludeForeign) + } if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok { r0 = rf(ctx, excludeForeign) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { r1 = rf(ctx, excludeForeign) } else { @@ -89,13 +92,16 @@ func (_m *Controller) CalculateTotalSizeByProject(ctx context.Context, projectID ret := _m.Called(ctx, projectID, excludeForeign) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok { + return rf(ctx, projectID, excludeForeign) + } if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok { r0 = rf(ctx, projectID, excludeForeign) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok { r1 = rf(ctx, projectID, excludeForeign) } else { @@ -124,13 +130,16 @@ func (_m *Controller) Ensure(ctx context.Context, digest string, contentType str ret := _m.Called(ctx, digest, contentType, size) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok { + return rf(ctx, digest, contentType, size) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok { r0 = rf(ctx, digest, contentType, size) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { r1 = rf(ctx, digest, contentType, size) } else { @@ -152,13 +161,16 @@ func (_m *Controller) Exist(ctx context.Context, digest string, options ...blob. ret := _m.Called(_ca...) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (bool, error)); ok { + return rf(ctx, digest, options...) + } if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) bool); ok { r0 = rf(ctx, digest, options...) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok { r1 = rf(ctx, digest, options...) } else { @@ -187,6 +199,10 @@ func (_m *Controller) FindMissingAssociationsForProject(ctx context.Context, pro ret := _m.Called(ctx, projectID, blobs) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok { + return rf(ctx, projectID, blobs) + } if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok { r0 = rf(ctx, projectID, blobs) } else { @@ -195,7 +211,6 @@ func (_m *Controller) FindMissingAssociationsForProject(ctx context.Context, pro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok { r1 = rf(ctx, projectID, blobs) } else { @@ -217,6 +232,10 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op ret := _m.Called(_ca...) var r0 *models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) (*models.Blob, error)); ok { + return rf(ctx, digest, options...) + } if rf, ok := ret.Get(0).(func(context.Context, string, ...blob.Option) *models.Blob); ok { r0 = rf(ctx, digest, options...) } else { @@ -225,7 +244,6 @@ func (_m *Controller) Get(ctx context.Context, digest string, options ...blob.Op } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, ...blob.Option) error); ok { r1 = rf(ctx, digest, options...) } else { @@ -240,13 +258,16 @@ func (_m *Controller) GetAcceptedBlobSize(ctx context.Context, sessionID string) ret := _m.Called(ctx, sessionID) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok { + return rf(ctx, sessionID) + } if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok { r0 = rf(ctx, sessionID) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, sessionID) } else { @@ -261,6 +282,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob, ret := _m.Called(ctx, query) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok { r0 = rf(ctx, query) } else { @@ -269,7 +294,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.Blob, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/controller/config/controller.go b/src/testing/controller/config/controller.go index 7a6b0018b12..5fffe925fc2 100644 --- a/src/testing/controller/config/controller.go +++ b/src/testing/controller/config/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package config @@ -19,6 +19,10 @@ func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, e ret := _m.Called(ctx) var r0 map[string]interface{} + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (map[string]interface{}, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) map[string]interface{}); ok { r0 = rf(ctx) } else { @@ -27,7 +31,6 @@ func (_m *Controller) AllConfigs(ctx context.Context) (map[string]interface{}, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -42,6 +45,10 @@ func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interfac ret := _m.Called(ctx, cfg, internal) var r0 map[string]*models.Value + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, bool) (map[string]*models.Value, error)); ok { + return rf(ctx, cfg, internal) + } if rf, ok := ret.Get(0).(func(context.Context, map[string]interface{}, bool) map[string]*models.Value); ok { r0 = rf(ctx, cfg, internal) } else { @@ -50,7 +57,6 @@ func (_m *Controller) ConvertForGet(ctx context.Context, cfg map[string]interfac } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, map[string]interface{}, bool) error); ok { r1 = rf(ctx, cfg, internal) } else { @@ -93,6 +99,10 @@ func (_m *Controller) UserConfigs(ctx context.Context) (map[string]*models.Value ret := _m.Called(ctx) var r0 map[string]*models.Value + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (map[string]*models.Value, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) map[string]*models.Value); ok { r0 = rf(ctx) } else { @@ -101,7 +111,6 @@ func (_m *Controller) UserConfigs(ctx context.Context) (map[string]*models.Value } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/controller/jobservice/scheduler_controller.go b/src/testing/controller/jobservice/scheduler_controller.go index 893fd12f1bf..a2dbbf58fba 100644 --- a/src/testing/controller/jobservice/scheduler_controller.go +++ b/src/testing/controller/jobservice/scheduler_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobservice @@ -22,13 +22,16 @@ func (_m *SchedulerController) Count(ctx context.Context, query *q.Query) (int64 ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *SchedulerController) Create(ctx context.Context, vendorType string, cr ret := _m.Called(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) (int64, error)); ok { + return rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) int64); ok { r0 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, interface{}, map[string]interface{}) error); ok { r1 = rf(ctx, vendorType, cronType, cron, callbackFuncName, policy, extrasParam) } else { @@ -78,6 +84,10 @@ func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*sch ret := _m.Called(ctx, vendorType) var r0 *scheduler.Schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*scheduler.Schedule, error)); ok { + return rf(ctx, vendorType) + } if rf, ok := ret.Get(0).(func(context.Context, string) *scheduler.Schedule); ok { r0 = rf(ctx, vendorType) } else { @@ -86,7 +96,6 @@ func (_m *SchedulerController) Get(ctx context.Context, vendorType string) (*sch } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, vendorType) } else { @@ -101,6 +110,10 @@ func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*sch ret := _m.Called(ctx, query) var r0 []*scheduler.Schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok { r0 = rf(ctx, query) } else { @@ -109,7 +122,6 @@ func (_m *SchedulerController) List(ctx context.Context, query *q.Query) ([]*sch } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -124,13 +136,16 @@ func (_m *SchedulerController) Paused(ctx context.Context) (bool, error) { ret := _m.Called(ctx) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/controller/project/controller.go b/src/testing/controller/project/controller.go index 1a5f8987e8c..e572e89f22c 100644 --- a/src/testing/controller/project/controller.go +++ b/src/testing/controller/project/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package project @@ -26,13 +26,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -47,13 +50,16 @@ func (_m *Controller) Create(ctx context.Context, _a1 *models.Project) (int64, e ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok { r1 = rf(ctx, _a1) } else { @@ -82,13 +88,16 @@ func (_m *Controller) Exists(ctx context.Context, projectIDOrName interface{}) ( ret := _m.Called(ctx, projectIDOrName) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, interface{}) (bool, error)); ok { + return rf(ctx, projectIDOrName) + } if rf, ok := ret.Get(0).(func(context.Context, interface{}) bool); ok { r0 = rf(ctx, projectIDOrName) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok { r1 = rf(ctx, projectIDOrName) } else { @@ -110,6 +119,10 @@ func (_m *Controller) Get(ctx context.Context, projectIDOrName interface{}, opti ret := _m.Called(_ca...) var r0 *models.Project + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) (*models.Project, error)); ok { + return rf(ctx, projectIDOrName, options...) + } if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...project.Option) *models.Project); ok { r0 = rf(ctx, projectIDOrName, options...) } else { @@ -118,7 +131,6 @@ func (_m *Controller) Get(ctx context.Context, projectIDOrName interface{}, opti } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, interface{}, ...project.Option) error); ok { r1 = rf(ctx, projectIDOrName, options...) } else { @@ -140,6 +152,10 @@ func (_m *Controller) GetByName(ctx context.Context, projectName string, options ret := _m.Called(_ca...) var r0 *models.Project + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) (*models.Project, error)); ok { + return rf(ctx, projectName, options...) + } if rf, ok := ret.Get(0).(func(context.Context, string, ...project.Option) *models.Project); ok { r0 = rf(ctx, projectName, options...) } else { @@ -148,7 +164,6 @@ func (_m *Controller) GetByName(ctx context.Context, projectName string, options } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, ...project.Option) error); ok { r1 = rf(ctx, projectName, options...) } else { @@ -170,6 +185,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje ret := _m.Called(_ca...) var r0 []*models.Project + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) ([]*models.Project, error)); ok { + return rf(ctx, query, options...) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...project.Option) []*models.Project); ok { r0 = rf(ctx, query, options...) } else { @@ -178,7 +197,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...proje } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...project.Option) error); ok { r1 = rf(ctx, query, options...) } else { @@ -193,6 +211,10 @@ func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonm ret := _m.Called(ctx, projectID, u) var r0 []int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) ([]int, error)); ok { + return rf(ctx, projectID, u) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *commonmodels.User) []int); ok { r0 = rf(ctx, projectID, u) } else { @@ -201,7 +223,6 @@ func (_m *Controller) ListRoles(ctx context.Context, projectID int64, u *commonm } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *commonmodels.User) error); ok { r1 = rf(ctx, projectID, u) } else { diff --git a/src/testing/controller/proxy/remote_interface.go b/src/testing/controller/proxy/remote_interface.go index df677adcdf9..827b2edef83 100644 --- a/src/testing/controller/proxy/remote_interface.go +++ b/src/testing/controller/proxy/remote_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package proxy @@ -20,13 +20,17 @@ func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCl ret := _m.Called(repo, dig) var r0 int64 + var r1 io.ReadCloser + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok { + return rf(repo, dig) + } if rf, ok := ret.Get(0).(func(string, string) int64); ok { r0 = rf(repo, dig) } else { r0 = ret.Get(0).(int64) } - var r1 io.ReadCloser if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { r1 = rf(repo, dig) } else { @@ -35,7 +39,6 @@ func (_m *RemoteInterface) BlobReader(repo string, dig string) (int64, io.ReadCl } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repo, dig) } else { @@ -50,6 +53,10 @@ func (_m *RemoteInterface) ListTags(repo string) ([]string, error) { ret := _m.Called(repo) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { + return rf(repo) + } if rf, ok := ret.Get(0).(func(string) []string); ok { r0 = rf(repo) } else { @@ -58,7 +65,6 @@ func (_m *RemoteInterface) ListTags(repo string) ([]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(repo) } else { @@ -73,6 +79,11 @@ func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manif ret := _m.Called(repo, ref) var r0 distribution.Manifest + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (distribution.Manifest, string, error)); ok { + return rf(repo, ref) + } if rf, ok := ret.Get(0).(func(string, string) distribution.Manifest); ok { r0 = rf(repo, ref) } else { @@ -81,14 +92,12 @@ func (_m *RemoteInterface) Manifest(repo string, ref string) (distribution.Manif } } - var r1 string if rf, ok := ret.Get(1).(func(string, string) string); ok { r1 = rf(repo, ref) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repo, ref) } else { @@ -103,13 +112,17 @@ func (_m *RemoteInterface) ManifestExist(repo string, ref string) (bool, *distri ret := _m.Called(repo, ref) var r0 bool + var r1 *distribution.Descriptor + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok { + return rf(repo, ref) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(repo, ref) } else { r0 = ret.Get(0).(bool) } - var r1 *distribution.Descriptor if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { r1 = rf(repo, ref) } else { @@ -118,7 +131,6 @@ func (_m *RemoteInterface) ManifestExist(repo string, ref string) (bool, *distri } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repo, ref) } else { diff --git a/src/testing/controller/purge/controller.go b/src/testing/controller/purge/controller.go index 824a6843ff4..77d0dfb665d 100644 --- a/src/testing/controller/purge/controller.go +++ b/src/testing/controller/purge/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package purge @@ -19,13 +19,16 @@ func (_m *Controller) Start(ctx context.Context, policy purge.JobPolicy, trigger ret := _m.Called(ctx, policy, trigger) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) (int64, error)); ok { + return rf(ctx, policy, trigger) + } if rf, ok := ret.Get(0).(func(context.Context, purge.JobPolicy, string) int64); ok { r0 = rf(ctx, policy, trigger) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, purge.JobPolicy, string) error); ok { r1 = rf(ctx, policy, trigger) } else { diff --git a/src/testing/controller/quota/controller.go b/src/testing/controller/quota/controller.go index 275fcce0c17..2c1aa40e79f 100644 --- a/src/testing/controller/quota/controller.go +++ b/src/testing/controller/quota/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package quota @@ -25,13 +25,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -53,13 +56,16 @@ func (_m *Controller) Create(ctx context.Context, reference string, referenceID ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok { + return rf(ctx, reference, referenceID, hardLimits, used...) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok { r0 = rf(ctx, reference, referenceID, hardLimits, used...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok { r1 = rf(ctx, reference, referenceID, hardLimits, used...) } else { @@ -95,6 +101,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, options ...quota.Option ret := _m.Called(_ca...) var r0 *models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) (*models.Quota, error)); ok { + return rf(ctx, id, options...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, ...quota.Option) *models.Quota); ok { r0 = rf(ctx, id, options...) } else { @@ -103,7 +113,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, options ...quota.Option } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, ...quota.Option) error); ok { r1 = rf(ctx, id, options...) } else { @@ -125,6 +134,10 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI ret := _m.Called(_ca...) var r0 *models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) (*models.Quota, error)); ok { + return rf(ctx, reference, referenceID, options...) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, ...quota.Option) *models.Quota); ok { r0 = rf(ctx, reference, referenceID, options...) } else { @@ -133,7 +146,6 @@ func (_m *Controller) GetByRef(ctx context.Context, reference string, referenceI } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, ...quota.Option) error); ok { r1 = rf(ctx, reference, referenceID, options...) } else { @@ -148,13 +160,16 @@ func (_m *Controller) IsEnabled(ctx context.Context, reference string, reference ret := _m.Called(ctx, reference, referenceID) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { + return rf(ctx, reference, referenceID) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { r0 = rf(ctx, reference, referenceID) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, reference, referenceID) } else { @@ -176,6 +191,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...quota ret := _m.Called(_ca...) var r0 []*models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) ([]*models.Quota, error)); ok { + return rf(ctx, query, options...) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...quota.Option) []*models.Quota); ok { r0 = rf(ctx, query, options...) } else { @@ -184,7 +203,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...quota } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...quota.Option) error); ok { r1 = rf(ctx, query, options...) } else { diff --git a/src/testing/controller/replication/controller.go b/src/testing/controller/replication/controller.go index 7d93d07995a..3a27015fe4f 100644 --- a/src/testing/controller/replication/controller.go +++ b/src/testing/controller/replication/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package replication @@ -25,13 +25,16 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i ret := _m.Called(ctx, policy) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, policy) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, policy) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, policy) } else { @@ -60,13 +63,16 @@ func (_m *Controller) ExecutionCount(ctx context.Context, query *q.Query) (int64 ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -81,6 +87,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*rep ret := _m.Called(ctx, executionID) var r0 *replication.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Execution, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Execution); ok { r0 = rf(ctx, executionID) } else { @@ -89,7 +99,6 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*rep } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { @@ -104,6 +113,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -112,7 +125,6 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -127,6 +139,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.T ret := _m.Called(ctx, taskID) var r0 *replication.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*replication.Task, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *replication.Task); ok { r0 = rf(ctx, taskID) } else { @@ -135,7 +151,6 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*replication.T } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -150,6 +165,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err ret := _m.Called(ctx, taskID) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, taskID) } else { @@ -158,7 +177,6 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -173,6 +191,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*re ret := _m.Called(ctx, query) var r0 []*replication.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Execution, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Execution); ok { r0 = rf(ctx, query) } else { @@ -181,7 +203,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, query *q.Query) ([]*re } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -196,6 +217,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -204,7 +229,6 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -219,6 +243,10 @@ func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replica ret := _m.Called(ctx, query) var r0 []*replication.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*replication.Task, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*replication.Task); ok { r0 = rf(ctx, query) } else { @@ -227,7 +255,6 @@ func (_m *Controller) ListTasks(ctx context.Context, query *q.Query) ([]*replica } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -242,13 +269,16 @@ func (_m *Controller) PolicyCount(ctx context.Context, query *q.Query) (int64, e ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -263,13 +293,16 @@ func (_m *Controller) Start(ctx context.Context, policy *model.Policy, resource ret := _m.Called(ctx, policy, resource, trigger) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) (int64, error)); ok { + return rf(ctx, policy, resource, trigger) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy, *regmodel.Resource, string) int64); ok { r0 = rf(ctx, policy, resource, trigger) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy, *regmodel.Resource, string) error); ok { r1 = rf(ctx, policy, resource, trigger) } else { @@ -298,13 +331,16 @@ func (_m *Controller) TaskCount(ctx context.Context, query *q.Query) (int64, err ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/controller/repository/controller.go b/src/testing/controller/repository/controller.go index 29014766471..140fdfcb037 100644 --- a/src/testing/controller/repository/controller.go +++ b/src/testing/controller/repository/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package repository @@ -35,13 +35,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -70,20 +73,23 @@ func (_m *Controller) Ensure(ctx context.Context, name string) (bool, int64, err ret := _m.Called(ctx, name) var r0 bool + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string) (bool, int64, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = rf(ctx, name) } else { r0 = ret.Get(0).(bool) } - var r1 int64 if rf, ok := ret.Get(1).(func(context.Context, string) int64); ok { r1 = rf(ctx, name) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = rf(ctx, name) } else { @@ -98,6 +104,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, err ret := _m.Called(ctx, id) var r0 *model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { r0 = rf(ctx, id) } else { @@ -106,7 +116,6 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*model.RepoRecord, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -121,6 +130,10 @@ func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRe ret := _m.Called(ctx, name) var r0 *model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok { r0 = rf(ctx, name) } else { @@ -129,7 +142,6 @@ func (_m *Controller) GetByName(ctx context.Context, name string) (*model.RepoRe } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, name) } else { @@ -144,6 +156,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*model.RepoRe ret := _m.Called(ctx, query) var r0 []*model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { r0 = rf(ctx, query) } else { @@ -152,7 +168,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*model.RepoRe } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/controller/retention/controller.go b/src/testing/controller/retention/controller.go index 7480e9d4661..14c089ceee1 100644 --- a/src/testing/controller/retention/controller.go +++ b/src/testing/controller/retention/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package retention @@ -23,13 +23,16 @@ func (_m *Controller) CreateRetention(ctx context.Context, p *policy.Metadata) ( ret := _m.Called(ctx, p) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) (int64, error)); ok { + return rf(ctx, p) + } if rf, ok := ret.Get(0).(func(context.Context, *policy.Metadata) int64); ok { r0 = rf(ctx, p) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *policy.Metadata) error); ok { r1 = rf(ctx, p) } else { @@ -58,6 +61,10 @@ func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metad ret := _m.Called(ctx, id) var r0 *policy.Metadata + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*policy.Metadata, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *policy.Metadata); ok { r0 = rf(ctx, id) } else { @@ -66,7 +73,6 @@ func (_m *Controller) GetRetention(ctx context.Context, id int64) (*policy.Metad } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -81,6 +87,10 @@ func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgrete ret := _m.Called(ctx, eid) var r0 *pkgretention.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Execution, error)); ok { + return rf(ctx, eid) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Execution); ok { r0 = rf(ctx, eid) } else { @@ -89,7 +99,6 @@ func (_m *Controller) GetRetentionExec(ctx context.Context, eid int64) (*pkgrete } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, eid) } else { @@ -104,6 +113,10 @@ func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (* ret := _m.Called(ctx, taskID) var r0 *pkgretention.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgretention.Task, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgretention.Task); ok { r0 = rf(ctx, taskID) } else { @@ -112,7 +125,6 @@ func (_m *Controller) GetRetentionExecTask(ctx context.Context, taskID int64) (* } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -127,6 +139,10 @@ func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64) ret := _m.Called(ctx, taskID) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, taskID) } else { @@ -135,7 +151,6 @@ func (_m *Controller) GetRetentionExecTaskLog(ctx context.Context, taskID int64) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -150,13 +165,16 @@ func (_m *Controller) GetTotalOfRetentionExecTasks(ctx context.Context, executio ret := _m.Called(ctx, executionID) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok { r0 = rf(ctx, executionID) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { @@ -171,13 +189,16 @@ func (_m *Controller) GetTotalOfRetentionExecs(ctx context.Context, policyID int ret := _m.Called(ctx, policyID) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (int64, error)); ok { + return rf(ctx, policyID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) int64); ok { r0 = rf(ctx, policyID) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, policyID) } else { @@ -192,6 +213,10 @@ func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID in ret := _m.Called(ctx, executionID, query) var r0 []*pkgretention.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Task, error)); ok { + return rf(ctx, executionID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Task); ok { r0 = rf(ctx, executionID, query) } else { @@ -200,7 +225,6 @@ func (_m *Controller) ListRetentionExecTasks(ctx context.Context, executionID in } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, executionID, query) } else { @@ -215,6 +239,10 @@ func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, qu ret := _m.Called(ctx, policyID, query) var r0 []*pkgretention.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*pkgretention.Execution, error)); ok { + return rf(ctx, policyID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*pkgretention.Execution); ok { r0 = rf(ctx, policyID, query) } else { @@ -223,7 +251,6 @@ func (_m *Controller) ListRetentionExecs(ctx context.Context, policyID int64, qu } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, policyID, query) } else { @@ -252,13 +279,16 @@ func (_m *Controller) TriggerRetentionExec(ctx context.Context, policyID int64, ret := _m.Called(ctx, policyID, trigger, dryRun) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) (int64, error)); ok { + return rf(ctx, policyID, trigger, dryRun) + } if rf, ok := ret.Get(0).(func(context.Context, int64, string, bool) int64); ok { r0 = rf(ctx, policyID, trigger, dryRun) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, string, bool) error); ok { r1 = rf(ctx, policyID, trigger, dryRun) } else { diff --git a/src/testing/controller/robot/controller.go b/src/testing/controller/robot/controller.go index 8e94dcc8165..658ac640200 100644 --- a/src/testing/controller/robot/controller.go +++ b/src/testing/controller/robot/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package robot @@ -21,13 +21,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,20 +45,23 @@ func (_m *Controller) Create(ctx context.Context, r *robot.Robot) (int64, string ret := _m.Called(ctx, r) var r0 int64 + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot) (int64, string, error)); ok { + return rf(ctx, r) + } if rf, ok := ret.Get(0).(func(context.Context, *robot.Robot) int64); ok { r0 = rf(ctx, r) } else { r0 = ret.Get(0).(int64) } - var r1 string if rf, ok := ret.Get(1).(func(context.Context, *robot.Robot) string); ok { r1 = rf(ctx, r) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context, *robot.Robot) error); ok { r2 = rf(ctx, r) } else { @@ -84,6 +90,10 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) ( ret := _m.Called(ctx, id, option) var r0 *robot.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) (*robot.Robot, error)); ok { + return rf(ctx, id, option) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *robot.Option) *robot.Robot); ok { r0 = rf(ctx, id, option) } else { @@ -92,7 +102,6 @@ func (_m *Controller) Get(ctx context.Context, id int64, option *robot.Option) ( } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *robot.Option) error); ok { r1 = rf(ctx, id, option) } else { @@ -107,6 +116,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Op ret := _m.Called(ctx, query, option) var r0 []*robot.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) ([]*robot.Robot, error)); ok { + return rf(ctx, query, option) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, *robot.Option) []*robot.Robot); ok { r0 = rf(ctx, query, option) } else { @@ -115,7 +128,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, option *robot.Op } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, *robot.Option) error); ok { r1 = rf(ctx, query, option) } else { diff --git a/src/testing/controller/scan/checker.go b/src/testing/controller/scan/checker.go index 341d09d5404..3cbb0a1609d 100644 --- a/src/testing/controller/scan/checker.go +++ b/src/testing/controller/scan/checker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scan @@ -20,13 +20,16 @@ func (_m *Checker) IsScannable(ctx context.Context, _a1 *artifact.Artifact) (boo ret := _m.Called(ctx, _a1) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (bool, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) bool); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok { r1 = rf(ctx, _a1) } else { diff --git a/src/testing/controller/scan/controller.go b/src/testing/controller/scan/controller.go index 7db296e62c5..df31b2ab402 100644 --- a/src/testing/controller/scan/controller.go +++ b/src/testing/controller/scan/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scan @@ -47,6 +47,10 @@ func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mim ret := _m.Called(ctx, _a1, mimeTypes) var r0 []*daoscan.Report + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) ([]*daoscan.Report, error)); ok { + return rf(ctx, _a1, mimeTypes) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) []*daoscan.Report); ok { r0 = rf(ctx, _a1, mimeTypes) } else { @@ -55,7 +59,6 @@ func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mim } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok { r1 = rf(ctx, _a1, mimeTypes) } else { @@ -70,6 +73,10 @@ func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uu ret := _m.Called(ctx, art, uuid) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) ([]byte, error)); ok { + return rf(ctx, art, uuid) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) []byte); ok { r0 = rf(ctx, art, uuid) } else { @@ -78,7 +85,6 @@ func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uu } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, string) error); ok { r1 = rf(ctx, art, uuid) } else { @@ -93,6 +99,10 @@ func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mi ret := _m.Called(ctx, _a1, mimeTypes) var r0 map[string]interface{} + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) (map[string]interface{}, error)); ok { + return rf(ctx, _a1, mimeTypes) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) map[string]interface{}); ok { r0 = rf(ctx, _a1, mimeTypes) } else { @@ -101,7 +111,6 @@ func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, mi } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok { r1 = rf(ctx, _a1, mimeTypes) } else { @@ -116,6 +125,10 @@ func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact, ret := _m.Called(ctx, _a1, allowlist, allowlistIsExpired) var r0 *scan.Vulnerable + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) (*scan.Vulnerable, error)); ok { + return rf(ctx, _a1, allowlist, allowlistIsExpired) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) *scan.Vulnerable); ok { r0 = rf(ctx, _a1, allowlist, allowlistIsExpired) } else { @@ -124,7 +137,6 @@ func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, models.CVESet, bool) error); ok { r1 = rf(ctx, _a1, allowlist, allowlistIsExpired) } else { @@ -160,13 +172,16 @@ func (_m *Controller) ScanAll(ctx context.Context, trigger string, async bool) ( ret := _m.Called(ctx, trigger, async) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int64, error)); ok { + return rf(ctx, trigger, async) + } if rf, ok := ret.Get(0).(func(context.Context, string, bool) int64); ok { r0 = rf(ctx, trigger, async) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { r1 = rf(ctx, trigger, async) } else { diff --git a/src/testing/controller/scandataexport/controller.go b/src/testing/controller/scandataexport/controller.go index 010df9b4bc3..ffdaa7e30a7 100644 --- a/src/testing/controller/scandataexport/controller.go +++ b/src/testing/controller/scandataexport/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scandataexport @@ -35,6 +35,10 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*exp ret := _m.Called(ctx, executionID) var r0 *export.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*export.Execution, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *export.Execution); ok { r0 = rf(ctx, executionID) } else { @@ -43,7 +47,6 @@ func (_m *Controller) GetExecution(ctx context.Context, executionID int64) (*exp } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { @@ -58,6 +61,10 @@ func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Tas ret := _m.Called(ctx, executionID) var r0 *task.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok { + return rf(ctx, executionID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { r0 = rf(ctx, executionID) } else { @@ -66,7 +73,6 @@ func (_m *Controller) GetTask(ctx context.Context, executionID int64) (*task.Tas } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, executionID) } else { @@ -81,6 +87,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*e ret := _m.Called(ctx, userName) var r0 []*export.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]*export.Execution, error)); ok { + return rf(ctx, userName) + } if rf, ok := ret.Get(0).(func(context.Context, string) []*export.Execution); ok { r0 = rf(ctx, userName) } else { @@ -89,7 +99,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, userName string) ([]*e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, userName) } else { @@ -104,13 +113,16 @@ func (_m *Controller) Start(ctx context.Context, criteria export.Request) (int64 ret := _m.Called(ctx, criteria) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, export.Request) (int64, error)); ok { + return rf(ctx, criteria) + } if rf, ok := ret.Get(0).(func(context.Context, export.Request) int64); ok { r0 = rf(ctx, criteria) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, export.Request) error); ok { r1 = rf(ctx, criteria) } else { diff --git a/src/testing/controller/scanner/controller.go b/src/testing/controller/scanner/controller.go index 257d8130f5a..ce797592365 100644 --- a/src/testing/controller/scanner/controller.go +++ b/src/testing/controller/scanner/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scanner @@ -25,13 +25,16 @@ func (_m *Controller) CreateRegistration(ctx context.Context, registration *scan ret := _m.Called(ctx, registration) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (string, error)); ok { + return rf(ctx, registration) + } if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) string); ok { r0 = rf(ctx, registration) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok { r1 = rf(ctx, registration) } else { @@ -46,6 +49,10 @@ func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID s ret := _m.Called(ctx, registrationUUID) var r0 *scanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok { + return rf(ctx, registrationUUID) + } if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok { r0 = rf(ctx, registrationUUID) } else { @@ -54,7 +61,6 @@ func (_m *Controller) DeleteRegistration(ctx context.Context, registrationUUID s } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, registrationUUID) } else { @@ -69,6 +75,10 @@ func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string) ret := _m.Called(ctx, registrationUUID) var r0 *v1.ScannerAdapterMetadata + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.ScannerAdapterMetadata, error)); ok { + return rf(ctx, registrationUUID) + } if rf, ok := ret.Get(0).(func(context.Context, string) *v1.ScannerAdapterMetadata); ok { r0 = rf(ctx, registrationUUID) } else { @@ -77,7 +87,6 @@ func (_m *Controller) GetMetadata(ctx context.Context, registrationUUID string) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, registrationUUID) } else { @@ -92,6 +101,10 @@ func (_m *Controller) GetRegistration(ctx context.Context, registrationUUID stri ret := _m.Called(ctx, registrationUUID) var r0 *scanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*scanner.Registration, error)); ok { + return rf(ctx, registrationUUID) + } if rf, ok := ret.Get(0).(func(context.Context, string) *scanner.Registration); ok { r0 = rf(ctx, registrationUUID) } else { @@ -100,7 +113,6 @@ func (_m *Controller) GetRegistration(ctx context.Context, registrationUUID stri } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, registrationUUID) } else { @@ -122,6 +134,10 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in ret := _m.Called(_ca...) var r0 *scanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) (*scanner.Registration, error)); ok { + return rf(ctx, projectID, options...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, ...controllerscanner.Option) *scanner.Registration); ok { r0 = rf(ctx, projectID, options...) } else { @@ -130,7 +146,6 @@ func (_m *Controller) GetRegistrationByProject(ctx context.Context, projectID in } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, ...controllerscanner.Option) error); ok { r1 = rf(ctx, projectID, options...) } else { @@ -145,13 +160,16 @@ func (_m *Controller) GetTotalOfRegistrations(ctx context.Context, query *q.Quer ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -166,6 +184,10 @@ func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([] ret := _m.Called(ctx, query) var r0 []*scanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scanner.Registration, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scanner.Registration); ok { r0 = rf(ctx, query) } else { @@ -174,7 +196,6 @@ func (_m *Controller) ListRegistrations(ctx context.Context, query *q.Query) ([] } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -189,6 +210,10 @@ func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registrati ret := _m.Called(ctx, registration) var r0 *v1.ScannerAdapterMetadata + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) (*v1.ScannerAdapterMetadata, error)); ok { + return rf(ctx, registration) + } if rf, ok := ret.Get(0).(func(context.Context, *scanner.Registration) *v1.ScannerAdapterMetadata); ok { r0 = rf(ctx, registration) } else { @@ -197,7 +222,6 @@ func (_m *Controller) Ping(ctx context.Context, registration *scanner.Registrati } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *scanner.Registration) error); ok { r1 = rf(ctx, registration) } else { diff --git a/src/testing/controller/systemartifact/controller.go b/src/testing/controller/systemartifact/controller.go index 86191028225..5a4f8cc4bfa 100644 --- a/src/testing/controller/systemartifact/controller.go +++ b/src/testing/controller/systemartifact/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package systemartifact diff --git a/src/testing/controller/task/controller.go b/src/testing/controller/task/controller.go index 86faec97da8..c2362588d94 100644 --- a/src/testing/controller/task/controller.go +++ b/src/testing/controller/task/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -21,13 +21,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,6 +45,10 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error) ret := _m.Called(ctx, id) var r0 *pkgtask.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Task, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Task); ok { r0 = rf(ctx, id) } else { @@ -50,7 +57,6 @@ func (_m *Controller) Get(ctx context.Context, id int64) (*pkgtask.Task, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -65,6 +71,10 @@ func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) { ret := _m.Called(ctx, id) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, id) } else { @@ -73,7 +83,6 @@ func (_m *Controller) GetLog(ctx context.Context, id int64) ([]byte, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -88,6 +97,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task ret := _m.Called(ctx, query) var r0 []*pkgtask.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Task, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Task); ok { r0 = rf(ctx, query) } else { @@ -96,7 +109,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*pkgtask.Task } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/controller/task/execution_controller.go b/src/testing/controller/task/execution_controller.go index 458615fa720..e4564508096 100644 --- a/src/testing/controller/task/execution_controller.go +++ b/src/testing/controller/task/execution_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -21,13 +21,16 @@ func (_m *ExecutionController) Count(ctx context.Context, query *q.Query) (int64 ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -56,6 +59,10 @@ func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Exec ret := _m.Called(ctx, id) var r0 *pkgtask.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*pkgtask.Execution, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *pkgtask.Execution); ok { r0 = rf(ctx, id) } else { @@ -64,7 +71,6 @@ func (_m *ExecutionController) Get(ctx context.Context, id int64) (*pkgtask.Exec } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -79,6 +85,10 @@ func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkg ret := _m.Called(ctx, query) var r0 []*pkgtask.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*pkgtask.Execution, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*pkgtask.Execution); ok { r0 = rf(ctx, query) } else { @@ -87,7 +97,6 @@ func (_m *ExecutionController) List(ctx context.Context, query *q.Query) ([]*pkg } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/controller/user/controller.go b/src/testing/controller/user/controller.go index b3acfb16fb2..bfdb7c8070e 100644 --- a/src/testing/controller/user/controller.go +++ b/src/testing/controller/user/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package user @@ -25,13 +25,16 @@ func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -46,13 +49,16 @@ func (_m *Controller) Create(ctx context.Context, u *models.User) (int, error) { ret := _m.Called(ctx, u) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok { + return rf(ctx, u) + } if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok { r0 = rf(ctx, u) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok { r1 = rf(ctx, u) } else { @@ -81,6 +87,10 @@ func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*model ret := _m.Called(ctx, id, opt) var r0 *models.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) (*models.User, error)); ok { + return rf(ctx, id, opt) + } if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) *models.User); ok { r0 = rf(ctx, id, opt) } else { @@ -89,7 +99,6 @@ func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*model } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int, *user.Option) error); ok { r1 = rf(ctx, id, opt) } else { @@ -104,6 +113,10 @@ func (_m *Controller) GetByName(ctx context.Context, username string) (*models.U ret := _m.Called(ctx, username) var r0 *models.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*models.User, error)); ok { + return rf(ctx, username) + } if rf, ok := ret.Get(0).(func(context.Context, string) *models.User); ok { r0 = rf(ctx, username) } else { @@ -112,7 +125,6 @@ func (_m *Controller) GetByName(ctx context.Context, username string) (*models.U } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, username) } else { @@ -127,6 +139,10 @@ func (_m *Controller) GetBySubIss(ctx context.Context, sub string, iss string) ( ret := _m.Called(ctx, sub, iss) var r0 *models.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.User, error)); ok { + return rf(ctx, sub, iss) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.User); ok { r0 = rf(ctx, sub, iss) } else { @@ -135,7 +151,6 @@ func (_m *Controller) GetBySubIss(ctx context.Context, sub string, iss string) ( } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, sub, iss) } else { @@ -157,6 +172,10 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm ret := _m.Called(_ca...) var r0 []*models.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) ([]*models.User, error)); ok { + return rf(ctx, query, options...) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...usermodels.Option) []*models.User); ok { r0 = rf(ctx, query, options...) } else { @@ -165,7 +184,6 @@ func (_m *Controller) List(ctx context.Context, query *q.Query, options ...userm } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...usermodels.Option) error); ok { r1 = rf(ctx, query, options...) } else { @@ -278,13 +296,16 @@ func (_m *Controller) VerifyPassword(ctx context.Context, usernameOrEmail string ret := _m.Called(ctx, usernameOrEmail, password) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { + return rf(ctx, usernameOrEmail, password) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { r0 = rf(ctx, usernameOrEmail, password) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, usernameOrEmail, password) } else { diff --git a/src/testing/controller/webhook/controller.go b/src/testing/controller/webhook/controller.go index 21fb6fd8605..b8967bbaedc 100644 --- a/src/testing/controller/webhook/controller.go +++ b/src/testing/controller/webhook/controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package webhook @@ -25,13 +25,16 @@ func (_m *Controller) CountExecutions(ctx context.Context, policyID int64, query ret := _m.Called(ctx, policyID, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok { + return rf(ctx, policyID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok { r0 = rf(ctx, policyID, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, policyID, query) } else { @@ -46,13 +49,16 @@ func (_m *Controller) CountPolicies(ctx context.Context, query *q.Query) (int64, ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -67,13 +73,16 @@ func (_m *Controller) CountTasks(ctx context.Context, execID int64, query *q.Que ret := _m.Called(ctx, execID, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) (int64, error)); ok { + return rf(ctx, execID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) int64); ok { r0 = rf(ctx, execID, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, execID, query) } else { @@ -88,13 +97,16 @@ func (_m *Controller) CreatePolicy(ctx context.Context, policy *model.Policy) (i ret := _m.Called(ctx, policy) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, policy) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, policy) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, policy) } else { @@ -123,13 +135,16 @@ func (_m *Controller) GetLastTriggerTime(ctx context.Context, eventType string, ret := _m.Called(ctx, eventType, policyID) var r0 time.Time + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64) (time.Time, error)); ok { + return rf(ctx, eventType, policyID) + } if rf, ok := ret.Get(0).(func(context.Context, string, int64) time.Time); ok { r0 = rf(ctx, eventType, policyID) } else { r0 = ret.Get(0).(time.Time) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { r1 = rf(ctx, eventType, policyID) } else { @@ -144,6 +159,10 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -152,7 +171,6 @@ func (_m *Controller) GetPolicy(ctx context.Context, id int64) (*model.Policy, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -167,6 +185,10 @@ func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, ev ret := _m.Called(ctx, projectID, eventType) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok { + return rf(ctx, projectID, eventType) + } if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok { r0 = rf(ctx, projectID, eventType) } else { @@ -175,7 +197,6 @@ func (_m *Controller) GetRelatedPolices(ctx context.Context, projectID int64, ev } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { r1 = rf(ctx, projectID, eventType) } else { @@ -190,6 +211,10 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, er ret := _m.Called(ctx, taskID) var r0 *task.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { r0 = rf(ctx, taskID) } else { @@ -198,7 +223,6 @@ func (_m *Controller) GetTask(ctx context.Context, taskID int64) (*task.Task, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -213,6 +237,10 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err ret := _m.Called(ctx, taskID) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, taskID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, taskID) } else { @@ -221,7 +249,6 @@ func (_m *Controller) GetTaskLog(ctx context.Context, taskID int64) ([]byte, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, taskID) } else { @@ -236,6 +263,10 @@ func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query ret := _m.Called(ctx, policyID, query) var r0 []*task.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Execution, error)); ok { + return rf(ctx, policyID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Execution); ok { r0 = rf(ctx, policyID, query) } else { @@ -244,7 +275,6 @@ func (_m *Controller) ListExecutions(ctx context.Context, policyID int64, query } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, policyID, query) } else { @@ -259,6 +289,10 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -267,7 +301,6 @@ func (_m *Controller) ListPolicies(ctx context.Context, query *q.Query) ([]*mode } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -282,6 +315,10 @@ func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Quer ret := _m.Called(ctx, execID, query) var r0 []*task.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) ([]*task.Task, error)); ok { + return rf(ctx, execID, query) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query) []*task.Task); ok { r0 = rf(ctx, execID, query) } else { @@ -290,7 +327,6 @@ func (_m *Controller) ListTasks(ctx context.Context, execID int64, query *q.Quer } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query) error); ok { r1 = rf(ctx, execID, query) } else { diff --git a/src/testing/lib/cache/cache.go b/src/testing/lib/cache/cache.go index 4c6ed3d7c8c..efac85b0a83 100644 --- a/src/testing/lib/cache/cache.go +++ b/src/testing/lib/cache/cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package cache @@ -68,6 +68,10 @@ func (_m *Cache) Keys(ctx context.Context, prefixes ...string) ([]string, error) ret := _m.Called(_ca...) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, ...string) ([]string, error)); ok { + return rf(ctx, prefixes...) + } if rf, ok := ret.Get(0).(func(context.Context, ...string) []string); ok { r0 = rf(ctx, prefixes...) } else { @@ -76,7 +80,6 @@ func (_m *Cache) Keys(ctx context.Context, prefixes ...string) ([]string, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, ...string) error); ok { r1 = rf(ctx, prefixes...) } else { diff --git a/src/testing/lib/config/manager.go b/src/testing/lib/config/manager.go index e3f2dd4738d..1f14c8d251c 100644 --- a/src/testing/lib/config/manager.go +++ b/src/testing/lib/config/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package config diff --git a/src/testing/lib/orm/creator.go b/src/testing/lib/orm/creator.go index a19a1cf29a3..4487fe63819 100644 --- a/src/testing/lib/orm/creator.go +++ b/src/testing/lib/orm/creator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package orm diff --git a/src/testing/pkg/accessory/dao/dao.go b/src/testing/pkg/accessory/dao/dao.go index 232487a8f5f..a59eb8a011e 100644 --- a/src/testing/pkg/accessory/dao/dao.go +++ b/src/testing/pkg/accessory/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -21,13 +21,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *DAO) Create(ctx context.Context, accessory *dao.Accessory) (int64, err ret := _m.Called(ctx, accessory) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) (int64, error)); ok { + return rf(ctx, accessory) + } if rf, ok := ret.Get(0).(func(context.Context, *dao.Accessory) int64); ok { r0 = rf(ctx, accessory) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *dao.Accessory) error); ok { r1 = rf(ctx, accessory) } else { @@ -77,13 +83,16 @@ func (_m *DAO) DeleteAccessories(ctx context.Context, query *q.Query) (int64, er ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -98,6 +107,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) { ret := _m.Called(ctx, id) var r0 *dao.Accessory + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Accessory, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Accessory); ok { r0 = rf(ctx, id) } else { @@ -106,7 +119,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Accessory, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -121,6 +133,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, erro ret := _m.Called(ctx, query) var r0 []*dao.Accessory + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Accessory, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Accessory); ok { r0 = rf(ctx, query) } else { @@ -129,7 +145,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Accessory, erro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/accessory/manager.go b/src/testing/pkg/accessory/manager.go index eb25fe22c60..d911e544021 100644 --- a/src/testing/pkg/accessory/manager.go +++ b/src/testing/pkg/accessory/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package accessory @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 model.AccessoryData) (int64, ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, model.AccessoryData) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, model.AccessoryData) error); ok { r1 = rf(ctx, _a1) } else { @@ -105,6 +111,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) { ret := _m.Called(ctx, id) var r0 model.Accessory + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (model.Accessory, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) model.Accessory); ok { r0 = rf(ctx, id) } else { @@ -113,7 +123,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (model.Accessory, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -128,6 +137,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory, ret := _m.Called(ctx, query) var r0 []model.Accessory + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]model.Accessory, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []model.Accessory); ok { r0 = rf(ctx, query) } else { @@ -136,7 +149,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]model.Accessory, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/accessory/model/accessory.go b/src/testing/pkg/accessory/model/accessory.go index e4df6efcaa0..22ce952796d 100644 --- a/src/testing/pkg/accessory/model/accessory.go +++ b/src/testing/pkg/accessory/model/accessory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package model diff --git a/src/testing/pkg/allowlist/dao/dao.go b/src/testing/pkg/allowlist/dao/dao.go index d48911c6ba9..5b7a8d67f61 100644 --- a/src/testing/pkg/allowlist/dao/dao.go +++ b/src/testing/pkg/allowlist/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -20,6 +20,10 @@ func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllo ret := _m.Called(ctx, pid) var r0 *models.CVEAllowlist + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok { + return rf(ctx, pid) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok { r0 = rf(ctx, pid) } else { @@ -28,7 +32,6 @@ func (_m *DAO) QueryByProjectID(ctx context.Context, pid int64) (*models.CVEAllo } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, pid) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Set(ctx context.Context, l models.CVEAllowlist) (int64, error) { ret := _m.Called(ctx, l) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) (int64, error)); ok { + return rf(ctx, l) + } if rf, ok := ret.Get(0).(func(context.Context, models.CVEAllowlist) int64); ok { r0 = rf(ctx, l) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, models.CVEAllowlist) error); ok { r1 = rf(ctx, l) } else { diff --git a/src/testing/pkg/allowlist/manager.go b/src/testing/pkg/allowlist/manager.go index 7406a190985..5a71fa2f27d 100644 --- a/src/testing/pkg/allowlist/manager.go +++ b/src/testing/pkg/allowlist/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package robot @@ -33,6 +33,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowli ret := _m.Called(ctx, projectID) var r0 *models.CVEAllowlist + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.CVEAllowlist, error)); ok { + return rf(ctx, projectID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *models.CVEAllowlist); ok { r0 = rf(ctx, projectID) } else { @@ -41,7 +45,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64) (*models.CVEAllowli } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, projectID) } else { @@ -56,6 +59,10 @@ func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) { ret := _m.Called(ctx) var r0 *models.CVEAllowlist + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*models.CVEAllowlist, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) *models.CVEAllowlist); ok { r0 = rf(ctx) } else { @@ -64,7 +71,6 @@ func (_m *Manager) GetSys(ctx context.Context) (*models.CVEAllowlist, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/artifact/manager.go b/src/testing/pkg/artifact/manager.go index 4a8ebb2106c..c08e4a25a91 100644 --- a/src/testing/pkg/artifact/manager.go +++ b/src/testing/pkg/artifact/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package artifact @@ -24,13 +24,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -45,13 +48,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *artifact.Artifact) (int64, e ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact) error); ok { r1 = rf(ctx, _a1) } else { @@ -94,6 +100,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error ret := _m.Called(ctx, id) var r0 *artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*artifact.Artifact, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *artifact.Artifact); ok { r0 = rf(ctx, id) } else { @@ -102,7 +112,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*artifact.Artifact, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -117,6 +126,10 @@ func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest st ret := _m.Called(ctx, repository, digest) var r0 *artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*artifact.Artifact, error)); ok { + return rf(ctx, repository, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) *artifact.Artifact); ok { r0 = rf(ctx, repository, digest) } else { @@ -125,7 +138,6 @@ func (_m *Manager) GetByDigest(ctx context.Context, repository string, digest st } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, repository, digest) } else { @@ -140,6 +152,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifa ret := _m.Called(ctx, query) var r0 []*artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Artifact, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Artifact); ok { r0 = rf(ctx, query) } else { @@ -148,7 +164,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*artifact.Artifa } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -163,6 +178,10 @@ func (_m *Manager) ListReferences(ctx context.Context, query *q.Query) ([]*artif ret := _m.Called(ctx, query) var r0 []*artifact.Reference + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*artifact.Reference, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*artifact.Reference); ok { r0 = rf(ctx, query) } else { @@ -171,7 +190,6 @@ func (_m *Manager) ListReferences(ctx context.Context, query *q.Query) ([]*artif } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/audit/dao/dao.go b/src/testing/pkg/audit/dao/dao.go index d07b86b7bc9..6b39c1ca8bd 100644 --- a/src/testing/pkg/audit/dao/dao.go +++ b/src/testing/pkg/audit/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, access *model.AuditLog) (int64, error ret := _m.Called(ctx, access) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok { + return rf(ctx, access) + } if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok { r0 = rf(ctx, access) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok { r1 = rf(ctx, access) } else { @@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) { ret := _m.Called(ctx, id) var r0 *model.AuditLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok { r0 = rf(ctx, id) } else { @@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.AuditLog, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, err ret := _m.Called(ctx, query) var r0 []*model.AuditLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok { r0 = rf(ctx, query) } else { @@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -124,13 +136,16 @@ func (_m *DAO) Purge(ctx context.Context, retentionHour int, includeOperations [ ret := _m.Called(ctx, retentionHour, includeOperations, dryRun) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok { + return rf(ctx, retentionHour, includeOperations, dryRun) + } if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok { r0 = rf(ctx, retentionHour, includeOperations, dryRun) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok { r1 = rf(ctx, retentionHour, includeOperations, dryRun) } else { diff --git a/src/testing/pkg/audit/manager.go b/src/testing/pkg/audit/manager.go index c96870f951b..24bde4d15ec 100644 --- a/src/testing/pkg/audit/manager.go +++ b/src/testing/pkg/audit/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package audit @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.AuditLog) (int64, erro ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *model.AuditLog) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.AuditLog) error); ok { r1 = rf(ctx, _a1) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) { ret := _m.Called(ctx, id) var r0 *model.AuditLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.AuditLog, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.AuditLog); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, ret := _m.Called(ctx, query) var r0 []*model.AuditLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.AuditLog, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.AuditLog); ok { r0 = rf(ctx, query) } else { @@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.AuditLog, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -123,13 +135,16 @@ func (_m *Manager) Purge(ctx context.Context, retentionHour int, includeOperatio ret := _m.Called(ctx, retentionHour, includeOperations, dryRun) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) (int64, error)); ok { + return rf(ctx, retentionHour, includeOperations, dryRun) + } if rf, ok := ret.Get(0).(func(context.Context, int, []string, bool) int64); ok { r0 = rf(ctx, retentionHour, includeOperations, dryRun) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int, []string, bool) error); ok { r1 = rf(ctx, retentionHour, includeOperations, dryRun) } else { diff --git a/src/testing/pkg/blob/manager.go b/src/testing/pkg/blob/manager.go index b7bd76bda33..4de2b10afd4 100644 --- a/src/testing/pkg/blob/manager.go +++ b/src/testing/pkg/blob/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package blob @@ -21,13 +21,16 @@ func (_m *Manager) AssociateWithArtifact(ctx context.Context, blobDigest string, ret := _m.Called(ctx, blobDigest, artifactDigest) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (int64, error)); ok { + return rf(ctx, blobDigest, artifactDigest) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) int64); ok { r0 = rf(ctx, blobDigest, artifactDigest) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, blobDigest, artifactDigest) } else { @@ -42,13 +45,16 @@ func (_m *Manager) AssociateWithProject(ctx context.Context, blobID int64, proje ret := _m.Called(ctx, blobID, projectID) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (int64, error)); ok { + return rf(ctx, blobID, projectID) + } if rf, ok := ret.Get(0).(func(context.Context, int64, int64) int64); ok { r0 = rf(ctx, blobID, projectID) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { r1 = rf(ctx, blobID, projectID) } else { @@ -63,13 +69,16 @@ func (_m *Manager) CalculateTotalSize(ctx context.Context, excludeForeignLayer b ret := _m.Called(ctx, excludeForeignLayer) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bool) (int64, error)); ok { + return rf(ctx, excludeForeignLayer) + } if rf, ok := ret.Get(0).(func(context.Context, bool) int64); ok { r0 = rf(ctx, excludeForeignLayer) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { r1 = rf(ctx, excludeForeignLayer) } else { @@ -84,13 +93,16 @@ func (_m *Manager) CalculateTotalSizeByProject(ctx context.Context, projectID in ret := _m.Called(ctx, projectID, excludeForeignLayer) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, bool) (int64, error)); ok { + return rf(ctx, projectID, excludeForeignLayer) + } if rf, ok := ret.Get(0).(func(context.Context, int64, bool) int64); ok { r0 = rf(ctx, projectID, excludeForeignLayer) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, bool) error); ok { r1 = rf(ctx, projectID, excludeForeignLayer) } else { @@ -133,13 +145,16 @@ func (_m *Manager) Create(ctx context.Context, digest string, contentType string ret := _m.Called(ctx, digest, contentType, size) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (int64, error)); ok { + return rf(ctx, digest, contentType, size) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) int64); ok { r0 = rf(ctx, digest, contentType, size) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { r1 = rf(ctx, digest, contentType, size) } else { @@ -168,6 +183,10 @@ func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, p ret := _m.Called(ctx, projectID, blobs) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) ([]*models.Blob, error)); ok { + return rf(ctx, projectID, blobs) + } if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Blob) []*models.Blob); ok { r0 = rf(ctx, projectID, blobs) } else { @@ -176,7 +195,6 @@ func (_m *Manager) FindBlobsShouldUnassociatedWithProject(ctx context.Context, p } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, []*models.Blob) error); ok { r1 = rf(ctx, projectID, blobs) } else { @@ -191,6 +209,10 @@ func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error) ret := _m.Called(ctx, digest) var r0 *models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*models.Blob, error)); ok { + return rf(ctx, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string) *models.Blob); ok { r0 = rf(ctx, digest) } else { @@ -199,7 +221,6 @@ func (_m *Manager) Get(ctx context.Context, digest string) (*models.Blob, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, digest) } else { @@ -214,6 +235,10 @@ func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob, ret := _m.Called(ctx, digest) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]*models.Blob, error)); ok { + return rf(ctx, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Blob); ok { r0 = rf(ctx, digest) } else { @@ -222,7 +247,6 @@ func (_m *Manager) GetByArt(ctx context.Context, digest string) ([]*models.Blob, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, digest) } else { @@ -237,6 +261,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, er ret := _m.Called(ctx, query) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Blob, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Blob); ok { r0 = rf(ctx, query) } else { @@ -245,7 +273,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Blob, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -274,13 +301,16 @@ func (_m *Manager) UpdateBlobStatus(ctx context.Context, _a1 *models.Blob) (int6 ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *models.Blob) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.Blob) error); ok { r1 = rf(ctx, _a1) } else { @@ -295,6 +325,10 @@ func (_m *Manager) UselessBlobs(ctx context.Context, timeWindowHours int64) ([]* ret := _m.Called(ctx, timeWindowHours) var r0 []*models.Blob + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*models.Blob, error)); ok { + return rf(ctx, timeWindowHours) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []*models.Blob); ok { r0 = rf(ctx, timeWindowHours) } else { @@ -303,7 +337,6 @@ func (_m *Manager) UselessBlobs(ctx context.Context, timeWindowHours int64) ([]* } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, timeWindowHours) } else { diff --git a/src/testing/pkg/cached/manifest/redis/cached_manager.go b/src/testing/pkg/cached/manifest/redis/cached_manager.go index b14f040c676..637dbf6b1ed 100644 --- a/src/testing/pkg/cached/manifest/redis/cached_manager.go +++ b/src/testing/pkg/cached/manifest/redis/cached_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package redis @@ -36,13 +36,16 @@ func (_m *CachedManager) CountCache(ctx context.Context) (int64, error) { ret := _m.Called(ctx) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) int64); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -99,6 +102,10 @@ func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error) ret := _m.Called(ctx, digest) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { + return rf(ctx, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { r0 = rf(ctx, digest) } else { @@ -107,7 +114,6 @@ func (_m *CachedManager) Get(ctx context.Context, digest string) ([]byte, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, digest) } else { diff --git a/src/testing/pkg/distribution/manifest.go b/src/testing/pkg/distribution/manifest.go index 81b2627595e..6250248ecf4 100644 --- a/src/testing/pkg/distribution/manifest.go +++ b/src/testing/pkg/distribution/manifest.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package distribution @@ -17,13 +17,17 @@ func (_m *Manifest) Payload() (string, []byte, error) { ret := _m.Called() var r0 string + var r1 []byte + var r2 error + if rf, ok := ret.Get(0).(func() (string, []byte, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } - var r1 []byte if rf, ok := ret.Get(1).(func() []byte); ok { r1 = rf() } else { @@ -32,7 +36,6 @@ func (_m *Manifest) Payload() (string, []byte, error) { } } - var r2 error if rf, ok := ret.Get(2).(func() error); ok { r2 = rf() } else { diff --git a/src/testing/pkg/immutable/dao/dao.go b/src/testing/pkg/immutable/dao/dao.go index 67d2809c88b..eb96d8fcd4b 100644 --- a/src/testing/pkg/immutable/dao/dao.go +++ b/src/testing/pkg/immutable/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) CreateImmutableRule(ctx context.Context, ir *model.ImmutableRule) ret := _m.Called(ctx, ir) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) (int64, error)); ok { + return rf(ctx, ir) + } if rf, ok := ret.Get(0).(func(context.Context, *model.ImmutableRule) int64); ok { r0 = rf(ctx, ir) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.ImmutableRule) error); ok { r1 = rf(ctx, ir) } else { @@ -78,6 +84,10 @@ func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.Immutable ret := _m.Called(ctx, id) var r0 *model.ImmutableRule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.ImmutableRule, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.ImmutableRule); ok { r0 = rf(ctx, id) } else { @@ -86,7 +96,6 @@ func (_m *DAO) GetImmutableRule(ctx context.Context, id int64) (*model.Immutable } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -101,6 +110,10 @@ func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model ret := _m.Called(ctx, query) var r0 []*model.ImmutableRule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.ImmutableRule, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.ImmutableRule); ok { r0 = rf(ctx, query) } else { @@ -109,7 +122,6 @@ func (_m *DAO) ListImmutableRules(ctx context.Context, query *q.Query) ([]*model } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/joblog/dao/dao.go b/src/testing/pkg/joblog/dao/dao.go index 70b25eed2b1..78395fd44fe 100644 --- a/src/testing/pkg/joblog/dao/dao.go +++ b/src/testing/pkg/joblog/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Create(ctx context.Context, jobLog *models.JobLog) (int64, error) ret := _m.Called(ctx, jobLog) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok { + return rf(ctx, jobLog) + } if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok { r0 = rf(ctx, jobLog) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok { r1 = rf(ctx, jobLog) } else { @@ -43,13 +46,16 @@ func (_m *DAO) DeleteBefore(ctx context.Context, t time.Time) (int64, error) { ret := _m.Called(ctx, t) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok { + return rf(ctx, t) + } if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok { r0 = rf(ctx, t) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { r1 = rf(ctx, t) } else { @@ -64,6 +70,10 @@ func (_m *DAO) Get(ctx context.Context, uuid string) (*models.JobLog, error) { ret := _m.Called(ctx, uuid) var r0 *models.JobLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok { + return rf(ctx, uuid) + } if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok { r0 = rf(ctx, uuid) } else { @@ -72,7 +82,6 @@ func (_m *DAO) Get(ctx context.Context, uuid string) (*models.JobLog, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, uuid) } else { diff --git a/src/testing/pkg/joblog/manager.go b/src/testing/pkg/joblog/manager.go index d6752cc9457..a45c2ef65c7 100644 --- a/src/testing/pkg/joblog/manager.go +++ b/src/testing/pkg/joblog/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package joblog @@ -22,13 +22,16 @@ func (_m *Manager) Create(ctx context.Context, jobLog *models.JobLog) (int64, er ret := _m.Called(ctx, jobLog) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) (int64, error)); ok { + return rf(ctx, jobLog) + } if rf, ok := ret.Get(0).(func(context.Context, *models.JobLog) int64); ok { r0 = rf(ctx, jobLog) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.JobLog) error); ok { r1 = rf(ctx, jobLog) } else { @@ -43,13 +46,16 @@ func (_m *Manager) DeleteBefore(ctx context.Context, t time.Time) (int64, error) ret := _m.Called(ctx, t) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, time.Time) (int64, error)); ok { + return rf(ctx, t) + } if rf, ok := ret.Get(0).(func(context.Context, time.Time) int64); ok { r0 = rf(ctx, t) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { r1 = rf(ctx, t) } else { @@ -64,6 +70,10 @@ func (_m *Manager) Get(ctx context.Context, uuid string) (*models.JobLog, error) ret := _m.Called(ctx, uuid) var r0 *models.JobLog + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*models.JobLog, error)); ok { + return rf(ctx, uuid) + } if rf, ok := ret.Get(0).(func(context.Context, string) *models.JobLog); ok { r0 = rf(ctx, uuid) } else { @@ -72,7 +82,6 @@ func (_m *Manager) Get(ctx context.Context, uuid string) (*models.JobLog, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, uuid) } else { diff --git a/src/testing/pkg/jobmonitor/job_service_monitor_client.go b/src/testing/pkg/jobmonitor/job_service_monitor_client.go index 3f0d49d3236..5bf8a2f0424 100644 --- a/src/testing/pkg/jobmonitor/job_service_monitor_client.go +++ b/src/testing/pkg/jobmonitor/job_service_monitor_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobmonitor @@ -17,6 +17,10 @@ func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) { ret := _m.Called() var r0 []*work.Queue + var r1 error + if rf, ok := ret.Get(0).(func() ([]*work.Queue, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() []*work.Queue); ok { r0 = rf() } else { @@ -25,7 +29,6 @@ func (_m *JobServiceMonitorClient) Queues() ([]*work.Queue, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -40,6 +43,10 @@ func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservati ret := _m.Called() var r0 []*work.WorkerObservation + var r1 error + if rf, ok := ret.Get(0).(func() ([]*work.WorkerObservation, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() []*work.WorkerObservation); ok { r0 = rf() } else { @@ -48,7 +55,6 @@ func (_m *JobServiceMonitorClient) WorkerObservations() ([]*work.WorkerObservati } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -63,6 +69,10 @@ func (_m *JobServiceMonitorClient) WorkerPoolHeartbeats() ([]*work.WorkerPoolHea ret := _m.Called() var r0 []*work.WorkerPoolHeartbeat + var r1 error + if rf, ok := ret.Get(0).(func() ([]*work.WorkerPoolHeartbeat, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() []*work.WorkerPoolHeartbeat); ok { r0 = rf() } else { @@ -71,7 +81,6 @@ func (_m *JobServiceMonitorClient) WorkerPoolHeartbeats() ([]*work.WorkerPoolHea } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { diff --git a/src/testing/pkg/jobmonitor/pool_manager.go b/src/testing/pkg/jobmonitor/pool_manager.go index e4380c22cc2..2e3b37f07b1 100644 --- a/src/testing/pkg/jobmonitor/pool_manager.go +++ b/src/testing/pkg/jobmonitor/pool_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobmonitor @@ -19,6 +19,10 @@ func (_m *PoolManager) List(ctx context.Context, monitorClient jobmonitor.JobSer ret := _m.Called(ctx, monitorClient) var r0 []*jobmonitor.WorkerPool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.WorkerPool, error)); ok { + return rf(ctx, monitorClient) + } if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.WorkerPool); ok { r0 = rf(ctx, monitorClient) } else { @@ -27,7 +31,6 @@ func (_m *PoolManager) List(ctx context.Context, monitorClient jobmonitor.JobSer } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok { r1 = rf(ctx, monitorClient) } else { diff --git a/src/testing/pkg/jobmonitor/queue_manager.go b/src/testing/pkg/jobmonitor/queue_manager.go index 786534cb595..ae012144a40 100644 --- a/src/testing/pkg/jobmonitor/queue_manager.go +++ b/src/testing/pkg/jobmonitor/queue_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobmonitor @@ -19,6 +19,10 @@ func (_m *QueueManager) List(ctx context.Context, monitClient jobmonitor.JobServ ret := _m.Called(ctx, monitClient) var r0 []*jobmonitor.Queue + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) ([]*jobmonitor.Queue, error)); ok { + return rf(ctx, monitClient) + } if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient) []*jobmonitor.Queue); ok { r0 = rf(ctx, monitClient) } else { @@ -27,7 +31,6 @@ func (_m *QueueManager) List(ctx context.Context, monitClient jobmonitor.JobServ } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient) error); ok { r1 = rf(ctx, monitClient) } else { diff --git a/src/testing/pkg/jobmonitor/redis_client.go b/src/testing/pkg/jobmonitor/redis_client.go index f437b200e6c..e4ee67ee132 100644 --- a/src/testing/pkg/jobmonitor/redis_client.go +++ b/src/testing/pkg/jobmonitor/redis_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobmonitor @@ -18,6 +18,10 @@ func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) { ret := _m.Called(ctx) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = rf(ctx) } else { @@ -26,7 +30,6 @@ func (_m *RedisClient) AllJobTypes(ctx context.Context) ([]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -55,6 +58,10 @@ func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]s ret := _m.Called(ctx, jobType) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { + return rf(ctx, jobType) + } if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok { r0 = rf(ctx, jobType) } else { @@ -63,7 +70,6 @@ func (_m *RedisClient) StopPendingJobs(ctx context.Context, jobType string) ([]s } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, jobType) } else { diff --git a/src/testing/pkg/jobmonitor/worker_manager.go b/src/testing/pkg/jobmonitor/worker_manager.go index 1a66b9eb413..a78ef3455b2 100644 --- a/src/testing/pkg/jobmonitor/worker_manager.go +++ b/src/testing/pkg/jobmonitor/worker_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jobmonitor @@ -19,6 +19,10 @@ func (_m *WorkerManager) List(ctx context.Context, monitClient jobmonitor.JobSer ret := _m.Called(ctx, monitClient, poolID) var r0 []*jobmonitor.Worker + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) ([]*jobmonitor.Worker, error)); ok { + return rf(ctx, monitClient, poolID) + } if rf, ok := ret.Get(0).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) []*jobmonitor.Worker); ok { r0 = rf(ctx, monitClient, poolID) } else { @@ -27,7 +31,6 @@ func (_m *WorkerManager) List(ctx context.Context, monitClient jobmonitor.JobSer } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, jobmonitor.JobServiceMonitorClient, string) error); ok { r1 = rf(ctx, monitClient, poolID) } else { diff --git a/src/testing/pkg/label/dao/dao.go b/src/testing/pkg/label/dao/dao.go index f2b782eee2b..ede2a0ca18f 100644 --- a/src/testing/pkg/label/dao/dao.go +++ b/src/testing/pkg/label/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, label *model.Label) (int64, error) { ret := _m.Called(ctx, label) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok { + return rf(ctx, label) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok { r0 = rf(ctx, label) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok { r1 = rf(ctx, label) } else { @@ -64,13 +70,16 @@ func (_m *DAO) CreateReference(ctx context.Context, reference *model.Reference) ret := _m.Called(ctx, reference) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) (int64, error)); ok { + return rf(ctx, reference) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Reference) int64); ok { r0 = rf(ctx, reference) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Reference) error); ok { r1 = rf(ctx, reference) } else { @@ -113,13 +122,16 @@ func (_m *DAO) DeleteReferences(ctx context.Context, query *q.Query) (int64, err ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -134,6 +146,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) { ret := _m.Called(ctx, id) var r0 *model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok { r0 = rf(ctx, id) } else { @@ -142,7 +158,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Label, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -157,6 +172,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error) ret := _m.Called(ctx, query) var r0 []*model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok { r0 = rf(ctx, query) } else { @@ -165,7 +184,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Label, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -180,6 +198,10 @@ func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.L ret := _m.Called(ctx, artifactID) var r0 []*model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok { + return rf(ctx, artifactID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok { r0 = rf(ctx, artifactID) } else { @@ -188,7 +210,6 @@ func (_m *DAO) ListByArtifact(ctx context.Context, artifactID int64) ([]*model.L } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, artifactID) } else { diff --git a/src/testing/pkg/label/manager.go b/src/testing/pkg/label/manager.go index f3b2ccecbaf..f331653515f 100644 --- a/src/testing/pkg/label/manager.go +++ b/src/testing/pkg/label/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package label @@ -36,13 +36,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -57,13 +60,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Label) (int64, error) ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Label) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Label) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Label) error); ok { r1 = rf(ctx, _a1) } else { @@ -92,6 +98,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) { ret := _m.Called(ctx, id) var r0 *model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Label, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Label); ok { r0 = rf(ctx, id) } else { @@ -100,7 +110,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Label, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -115,6 +124,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, er ret := _m.Called(ctx, query) var r0 []*model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Label, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Label); ok { r0 = rf(ctx, query) } else { @@ -123,7 +136,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Label, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -138,6 +150,10 @@ func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*mod ret := _m.Called(ctx, artifactID) var r0 []*model.Label + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*model.Label, error)); ok { + return rf(ctx, artifactID) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []*model.Label); ok { r0 = rf(ctx, artifactID) } else { @@ -146,7 +162,6 @@ func (_m *Manager) ListByArtifact(ctx context.Context, artifactID int64) ([]*mod } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, artifactID) } else { diff --git a/src/testing/pkg/ldap/manager.go b/src/testing/pkg/ldap/manager.go index c85fff126bf..74a14d2203a 100644 --- a/src/testing/pkg/ldap/manager.go +++ b/src/testing/pkg/ldap/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package ldap @@ -23,6 +23,10 @@ func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImpor ret := _m.Called(ctx, sess, ldapImportUsers) var r0 []model.FailedImportUser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) ([]model.FailedImportUser, error)); ok { + return rf(ctx, sess, ldapImportUsers) + } if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, []string) []model.FailedImportUser); ok { r0 = rf(ctx, sess, ldapImportUsers) } else { @@ -31,7 +35,6 @@ func (_m *Manager) ImportUser(ctx context.Context, sess *ldap.Session, ldapImpor } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, []string) error); ok { r1 = rf(ctx, sess, ldapImportUsers) } else { @@ -46,13 +49,16 @@ func (_m *Manager) Ping(ctx context.Context, cfg models.LdapConf) (bool, error) ret := _m.Called(ctx, cfg) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) (bool, error)); ok { + return rf(ctx, cfg) + } if rf, ok := ret.Get(0).(func(context.Context, models.LdapConf) bool); ok { r0 = rf(ctx, cfg) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, models.LdapConf) error); ok { r1 = rf(ctx, cfg) } else { @@ -67,6 +73,10 @@ func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupNam ret := _m.Called(ctx, sess, groupName, groupDN) var r0 []model.Group + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) ([]model.Group, error)); ok { + return rf(ctx, sess, groupName, groupDN) + } if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string, string) []model.Group); ok { r0 = rf(ctx, sess, groupName, groupDN) } else { @@ -75,7 +85,6 @@ func (_m *Manager) SearchGroup(ctx context.Context, sess *ldap.Session, groupNam } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string, string) error); ok { r1 = rf(ctx, sess, groupName, groupDN) } else { @@ -90,6 +99,10 @@ func (_m *Manager) SearchUser(ctx context.Context, sess *ldap.Session, username ret := _m.Called(ctx, sess, username) var r0 []model.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) ([]model.User, error)); ok { + return rf(ctx, sess, username) + } if rf, ok := ret.Get(0).(func(context.Context, *ldap.Session, string) []model.User); ok { r0 = rf(ctx, sess, username) } else { @@ -98,7 +111,6 @@ func (_m *Manager) SearchUser(ctx context.Context, sess *ldap.Session, username } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *ldap.Session, string) error); ok { r1 = rf(ctx, sess, username) } else { diff --git a/src/testing/pkg/member/fake_member_manager.go b/src/testing/pkg/member/fake_member_manager.go index 743c2052f82..4132d4c0d43 100644 --- a/src/testing/pkg/member/fake_member_manager.go +++ b/src/testing/pkg/member/fake_member_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package member @@ -22,13 +22,16 @@ func (_m *Manager) AddProjectMember(ctx context.Context, _a1 models.Member) (int ret := _m.Called(ctx, _a1) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, models.Member) (int, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, models.Member) int); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, models.Member) error); ok { r1 = rf(ctx, _a1) } else { @@ -71,6 +74,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, memberID int) (*mod ret := _m.Called(ctx, projectID, memberID) var r0 *models.Member + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int) (*models.Member, error)); ok { + return rf(ctx, projectID, memberID) + } if rf, ok := ret.Get(0).(func(context.Context, int64, int) *models.Member); ok { r0 = rf(ctx, projectID, memberID) } else { @@ -79,7 +86,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, memberID int) (*mod } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, int) error); ok { r1 = rf(ctx, projectID, memberID) } else { @@ -101,13 +107,16 @@ func (_m *Manager) GetTotalOfProjectMembers(ctx context.Context, projectID int64 ret := _m.Called(_ca...) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) (int, error)); ok { + return rf(ctx, projectID, query, roles...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *q.Query, ...int) int); ok { r0 = rf(ctx, projectID, query, roles...) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *q.Query, ...int) error); ok { r1 = rf(ctx, projectID, query, roles...) } else { @@ -122,6 +131,10 @@ func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q ret := _m.Called(ctx, queryMember, query) var r0 []*models.Member + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) ([]*models.Member, error)); ok { + return rf(ctx, queryMember, query) + } if rf, ok := ret.Get(0).(func(context.Context, models.Member, *q.Query) []*models.Member); ok { r0 = rf(ctx, queryMember, query) } else { @@ -130,7 +143,6 @@ func (_m *Manager) List(ctx context.Context, queryMember models.Member, query *q } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, models.Member, *q.Query) error); ok { r1 = rf(ctx, queryMember, query) } else { @@ -145,6 +157,10 @@ func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID i ret := _m.Called(ctx, user, projectID) var r0 []int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) ([]int, error)); ok { + return rf(ctx, user, projectID) + } if rf, ok := ret.Get(0).(func(context.Context, *models.User, int64) []int); ok { r0 = rf(ctx, user, projectID) } else { @@ -153,7 +169,6 @@ func (_m *Manager) ListRoles(ctx context.Context, user *models.User, projectID i } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.User, int64) error); ok { r1 = rf(ctx, user, projectID) } else { @@ -168,6 +183,10 @@ func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, enti ret := _m.Called(ctx, projectID, entityName) var r0 []*models.Member + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*models.Member, error)); ok { + return rf(ctx, projectID, entityName) + } if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*models.Member); ok { r0 = rf(ctx, projectID, entityName) } else { @@ -176,7 +195,6 @@ func (_m *Manager) SearchMemberByName(ctx context.Context, projectID int64, enti } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { r1 = rf(ctx, projectID, entityName) } else { diff --git a/src/testing/pkg/notification/policy/dao/dao.go b/src/testing/pkg/notification/policy/dao/dao.go index 75bb5787137..e309556df66 100644 --- a/src/testing/pkg/notification/policy/dao/dao.go +++ b/src/testing/pkg/notification/policy/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, n *model.Policy) (int64, error) { ret := _m.Called(ctx, n) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, n) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, n) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, n) } else { @@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) { ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/notification/policy/manager.go b/src/testing/pkg/notification/policy/manager.go index 43a1d593e9c..96f119df159 100644 --- a/src/testing/pkg/notification/policy/manager.go +++ b/src/testing/pkg/notification/policy/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package policy @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.Policy) (int64, error) ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, _a1) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) { ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, event ret := _m.Called(ctx, projectID, eventType) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]*model.Policy, error)); ok { + return rf(ctx, projectID, eventType) + } if rf, ok := ret.Get(0).(func(context.Context, int64, string) []*model.Policy); ok { r0 = rf(ctx, projectID, eventType) } else { @@ -108,7 +121,6 @@ func (_m *Manager) GetRelatedPolices(ctx context.Context, projectID int64, event } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { r1 = rf(ctx, projectID, eventType) } else { @@ -123,6 +135,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -131,7 +147,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/oidc/dao/meta_dao.go b/src/testing/pkg/oidc/dao/meta_dao.go index 0e8c202e36b..46a98f47297 100644 --- a/src/testing/pkg/oidc/dao/meta_dao.go +++ b/src/testing/pkg/oidc/dao/meta_dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *MetaDAO) Create(ctx context.Context, oidcUser *models.OIDCUser) (int, ret := _m.Called(ctx, oidcUser) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok { + return rf(ctx, oidcUser) + } if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok { r0 = rf(ctx, oidcUser) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok { r1 = rf(ctx, oidcUser) } else { @@ -57,6 +60,10 @@ func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models. ret := _m.Called(ctx, username) var r0 *models.OIDCUser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*models.OIDCUser, error)); ok { + return rf(ctx, username) + } if rf, ok := ret.Get(0).(func(context.Context, string) *models.OIDCUser); ok { r0 = rf(ctx, username) } else { @@ -65,7 +72,6 @@ func (_m *MetaDAO) GetByUsername(ctx context.Context, username string) (*models. } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, username) } else { @@ -80,6 +86,10 @@ func (_m *MetaDAO) List(ctx context.Context, query *q.Query) ([]*models.OIDCUser ret := _m.Called(ctx, query) var r0 []*models.OIDCUser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.OIDCUser, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.OIDCUser); ok { r0 = rf(ctx, query) } else { @@ -88,7 +98,6 @@ func (_m *MetaDAO) List(ctx context.Context, query *q.Query) ([]*models.OIDCUser } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/oidc/meta_manager.go b/src/testing/pkg/oidc/meta_manager.go index 703e33e0159..a890160c195 100644 --- a/src/testing/pkg/oidc/meta_manager.go +++ b/src/testing/pkg/oidc/meta_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package oidc @@ -19,13 +19,16 @@ func (_m *MetaManager) Create(ctx context.Context, oidcUser *models.OIDCUser) (i ret := _m.Called(ctx, oidcUser) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) (int, error)); ok { + return rf(ctx, oidcUser) + } if rf, ok := ret.Get(0).(func(context.Context, *models.OIDCUser) int); ok { r0 = rf(ctx, oidcUser) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.OIDCUser) error); ok { r1 = rf(ctx, oidcUser) } else { @@ -54,6 +57,10 @@ func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string) ret := _m.Called(ctx, sub, iss) var r0 *models.OIDCUser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.OIDCUser, error)); ok { + return rf(ctx, sub, iss) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.OIDCUser); ok { r0 = rf(ctx, sub, iss) } else { @@ -62,7 +69,6 @@ func (_m *MetaManager) GetBySubIss(ctx context.Context, sub string, iss string) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, sub, iss) } else { @@ -77,6 +83,10 @@ func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUs ret := _m.Called(ctx, uid) var r0 *models.OIDCUser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int) (*models.OIDCUser, error)); ok { + return rf(ctx, uid) + } if rf, ok := ret.Get(0).(func(context.Context, int) *models.OIDCUser); ok { r0 = rf(ctx, uid) } else { @@ -85,7 +95,6 @@ func (_m *MetaManager) GetByUserID(ctx context.Context, uid int) (*models.OIDCUs } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = rf(ctx, uid) } else { diff --git a/src/testing/pkg/project/manager.go b/src/testing/pkg/project/manager.go index e8b134be81a..169bdec507f 100644 --- a/src/testing/pkg/project/manager.go +++ b/src/testing/pkg/project/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package project @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *models.Project) (int64, erro ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.Project) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *models.Project) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.Project) error); ok { r1 = rf(ctx, _a1) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Proje ret := _m.Called(ctx, idOrName) var r0 *models.Project + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, interface{}) (*models.Project, error)); ok { + return rf(ctx, idOrName) + } if rf, ok := ret.Get(0).(func(context.Context, interface{}) *models.Project); ok { r0 = rf(ctx, idOrName) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, idOrName interface{}) (*models.Proje } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, interface{}) error); ok { r1 = rf(ctx, idOrName) } else { @@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project, ret := _m.Called(ctx, query) var r0 []*models.Project + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Project, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Project); ok { r0 = rf(ctx, query) } else { @@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Project, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -130,6 +142,10 @@ func (_m *Manager) ListRoles(ctx context.Context, projectID int64, userID int, g ret := _m.Called(_ca...) var r0 []int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) ([]int, error)); ok { + return rf(ctx, projectID, userID, groupIDs...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, int, ...int) []int); ok { r0 = rf(ctx, projectID, userID, groupIDs...) } else { @@ -138,7 +154,6 @@ func (_m *Manager) ListRoles(ctx context.Context, projectID int64, userID int, g } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, int, ...int) error); ok { r1 = rf(ctx, projectID, userID, groupIDs...) } else { diff --git a/src/testing/pkg/project/metadata/manager.go b/src/testing/pkg/project/metadata/manager.go index 315443cc643..c24730638e2 100644 --- a/src/testing/pkg/project/metadata/manager.go +++ b/src/testing/pkg/project/metadata/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package metadata @@ -62,6 +62,10 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma ret := _m.Called(_ca...) var r0 map[string]string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) (map[string]string, error)); ok { + return rf(ctx, projectID, meta...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, ...string) map[string]string); ok { r0 = rf(ctx, projectID, meta...) } else { @@ -70,7 +74,6 @@ func (_m *Manager) Get(ctx context.Context, projectID int64, meta ...string) (ma } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, ...string) error); ok { r1 = rf(ctx, projectID, meta...) } else { @@ -85,6 +88,10 @@ func (_m *Manager) List(ctx context.Context, name string, value string) ([]*mode ret := _m.Called(ctx, name, value) var r0 []*models.ProjectMetadata + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]*models.ProjectMetadata, error)); ok { + return rf(ctx, name, value) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) []*models.ProjectMetadata); ok { r0 = rf(ctx, name, value) } else { @@ -93,7 +100,6 @@ func (_m *Manager) List(ctx context.Context, name string, value string) ([]*mode } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, name, value) } else { diff --git a/src/testing/pkg/queuestatus/manager.go b/src/testing/pkg/queuestatus/manager.go index 34d718f8530..52519fbfcd2 100644 --- a/src/testing/pkg/queuestatus/manager.go +++ b/src/testing/pkg/queuestatus/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package queuestatus @@ -19,6 +19,10 @@ func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error ret := _m.Called(ctx) var r0 map[string]bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (map[string]bool, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) map[string]bool); ok { r0 = rf(ctx) } else { @@ -27,7 +31,6 @@ func (_m *Manager) AllJobTypeStatus(ctx context.Context) (map[string]bool, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -42,13 +45,16 @@ func (_m *Manager) CreateOrUpdate(ctx context.Context, status *model.JobQueueSta ret := _m.Called(ctx, status) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) (int64, error)); ok { + return rf(ctx, status) + } if rf, ok := ret.Get(0).(func(context.Context, *model.JobQueueStatus) int64); ok { r0 = rf(ctx, status) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.JobQueueStatus) error); ok { r1 = rf(ctx, status) } else { @@ -63,6 +69,10 @@ func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStat ret := _m.Called(ctx, jobType) var r0 *model.JobQueueStatus + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*model.JobQueueStatus, error)); ok { + return rf(ctx, jobType) + } if rf, ok := ret.Get(0).(func(context.Context, string) *model.JobQueueStatus); ok { r0 = rf(ctx, jobType) } else { @@ -71,7 +81,6 @@ func (_m *Manager) Get(ctx context.Context, jobType string) (*model.JobQueueStat } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, jobType) } else { @@ -86,6 +95,10 @@ func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) { ret := _m.Called(ctx) var r0 []*model.JobQueueStatus + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]*model.JobQueueStatus, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []*model.JobQueueStatus); ok { r0 = rf(ctx) } else { @@ -94,7 +107,6 @@ func (_m *Manager) List(ctx context.Context) ([]*model.JobQueueStatus, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/quota/driver/driver.go b/src/testing/pkg/quota/driver/driver.go index 041de4a1bec..c9dd0b85884 100644 --- a/src/testing/pkg/quota/driver/driver.go +++ b/src/testing/pkg/quota/driver/driver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package driver @@ -21,6 +21,10 @@ func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.Resourc ret := _m.Called(ctx, key) var r0 types.ResourceList + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ResourceList, error)); ok { + return rf(ctx, key) + } if rf, ok := ret.Get(0).(func(context.Context, string) types.ResourceList); ok { r0 = rf(ctx, key) } else { @@ -29,7 +33,6 @@ func (_m *Driver) CalculateUsage(ctx context.Context, key string) (types.Resourc } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, key) } else { @@ -44,13 +47,16 @@ func (_m *Driver) Enabled(ctx context.Context, key string) (bool, error) { ret := _m.Called(ctx, key) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { + return rf(ctx, key) + } if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = rf(ctx, key) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, key) } else { @@ -81,6 +87,10 @@ func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error ret := _m.Called(ctx, key) var r0 driver.RefObject + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (driver.RefObject, error)); ok { + return rf(ctx, key) + } if rf, ok := ret.Get(0).(func(context.Context, string) driver.RefObject); ok { r0 = rf(ctx, key) } else { @@ -89,7 +99,6 @@ func (_m *Driver) Load(ctx context.Context, key string) (driver.RefObject, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, key) } else { diff --git a/src/testing/pkg/quota/manager.go b/src/testing/pkg/quota/manager.go index a143fe2af2d..d44ba4d4c14 100644 --- a/src/testing/pkg/quota/manager.go +++ b/src/testing/pkg/quota/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package quota @@ -23,13 +23,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -51,13 +54,16 @@ func (_m *Manager) Create(ctx context.Context, reference string, referenceID str ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) (int64, error)); ok { + return rf(ctx, reference, referenceID, hardLimits, usages...) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) int64); ok { r0 = rf(ctx, reference, referenceID, hardLimits, usages...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, types.ResourceList, ...types.ResourceList) error); ok { r1 = rf(ctx, reference, referenceID, hardLimits, usages...) } else { @@ -86,6 +92,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) { ret := _m.Called(ctx, id) var r0 *models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*models.Quota, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *models.Quota); ok { r0 = rf(ctx, id) } else { @@ -94,7 +104,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*models.Quota, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -109,6 +118,10 @@ func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID s ret := _m.Called(ctx, reference, referenceID) var r0 *models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*models.Quota, error)); ok { + return rf(ctx, reference, referenceID) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) *models.Quota); ok { r0 = rf(ctx, reference, referenceID) } else { @@ -117,7 +130,6 @@ func (_m *Manager) GetByRef(ctx context.Context, reference string, referenceID s } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, reference, referenceID) } else { @@ -132,6 +144,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, e ret := _m.Called(ctx, query) var r0 []*models.Quota + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.Quota, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.Quota); ok { r0 = rf(ctx, query) } else { @@ -140,7 +156,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*models.Quota, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/rbac/dao/dao.go b/src/testing/pkg/rbac/dao/dao.go index 2a2430715da..f2e32934820 100644 --- a/src/testing/pkg/rbac/dao/dao.go +++ b/src/testing/pkg/rbac/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) CreatePermission(ctx context.Context, rp *model.RolePermission) ( ret := _m.Called(ctx, rp) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok { + return rf(ctx, rp) + } if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok { r0 = rf(ctx, rp) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok { r1 = rf(ctx, rp) } else { @@ -43,13 +46,16 @@ func (_m *DAO) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy) ret := _m.Called(ctx, pp) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok { + return rf(ctx, pp) + } if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok { r0 = rf(ctx, pp) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok { r1 = rf(ctx, pp) } else { @@ -106,6 +112,10 @@ func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID ret := _m.Called(ctx, roleType, roleID) var r0 []*model.UniversalRolePermission + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok { + return rf(ctx, roleType, roleID) + } if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok { r0 = rf(ctx, roleType, roleID) } else { @@ -114,7 +124,6 @@ func (_m *DAO) GetPermissionsByRole(ctx context.Context, roleType string, roleID } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { r1 = rf(ctx, roleType, roleID) } else { @@ -129,6 +138,10 @@ func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.Ro ret := _m.Called(ctx, query) var r0 []*model.RolePermission + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok { r0 = rf(ctx, query) } else { @@ -137,7 +150,6 @@ func (_m *DAO) ListPermissions(ctx context.Context, query *q.Query) ([]*model.Ro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -152,6 +164,10 @@ func (_m *DAO) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.P ret := _m.Called(ctx, query) var r0 []*model.PermissionPolicy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok { r0 = rf(ctx, query) } else { @@ -160,7 +176,6 @@ func (_m *DAO) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.P } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/rbac/manager.go b/src/testing/pkg/rbac/manager.go index ff720f09bda..cc6c28aa1cb 100644 --- a/src/testing/pkg/rbac/manager.go +++ b/src/testing/pkg/rbac/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package rbac @@ -21,13 +21,16 @@ func (_m *Manager) CreatePermission(ctx context.Context, rp *model.RolePermissio ret := _m.Called(ctx, rp) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) (int64, error)); ok { + return rf(ctx, rp) + } if rf, ok := ret.Get(0).(func(context.Context, *model.RolePermission) int64); ok { r0 = rf(ctx, rp) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.RolePermission) error); ok { r1 = rf(ctx, rp) } else { @@ -42,13 +45,16 @@ func (_m *Manager) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPol ret := _m.Called(ctx, pp) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) (int64, error)); ok { + return rf(ctx, pp) + } if rf, ok := ret.Get(0).(func(context.Context, *model.PermissionPolicy) int64); ok { r0 = rf(ctx, pp) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.PermissionPolicy) error); ok { r1 = rf(ctx, pp) } else { @@ -105,6 +111,10 @@ func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, ro ret := _m.Called(ctx, roleType, roleID) var r0 []*model.UniversalRolePermission + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64) ([]*model.UniversalRolePermission, error)); ok { + return rf(ctx, roleType, roleID) + } if rf, ok := ret.Get(0).(func(context.Context, string, int64) []*model.UniversalRolePermission); ok { r0 = rf(ctx, roleType, roleID) } else { @@ -113,7 +123,6 @@ func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, ro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { r1 = rf(ctx, roleType, roleID) } else { @@ -128,6 +137,10 @@ func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*mode ret := _m.Called(ctx, query) var r0 []*model.RolePermission + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RolePermission, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RolePermission); ok { r0 = rf(ctx, query) } else { @@ -136,7 +149,6 @@ func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*mode } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -151,6 +163,10 @@ func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*mod ret := _m.Called(ctx, query) var r0 []*model.PermissionPolicy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.PermissionPolicy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.PermissionPolicy); ok { r0 = rf(ctx, query) } else { @@ -159,7 +175,6 @@ func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*mod } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/reg/adapter/adapter.go b/src/testing/pkg/reg/adapter/adapter.go index 36b6d27fb0d..9cc41618d6d 100644 --- a/src/testing/pkg/reg/adapter/adapter.go +++ b/src/testing/pkg/reg/adapter/adapter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package adapter @@ -17,13 +17,16 @@ func (_m *Adapter) HealthCheck() (string, error) { ret := _m.Called() var r0 string + var r1 error + if rf, ok := ret.Get(0).(func() (string, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -38,6 +41,10 @@ func (_m *Adapter) Info() (*model.RegistryInfo, error) { ret := _m.Called() var r0 *model.RegistryInfo + var r1 error + if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok { r0 = rf() } else { @@ -46,7 +53,6 @@ func (_m *Adapter) Info() (*model.RegistryInfo, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { diff --git a/src/testing/pkg/reg/dao/dao.go b/src/testing/pkg/reg/dao/dao.go index 0f6b4e51372..09cebb59f2b 100644 --- a/src/testing/pkg/reg/dao/dao.go +++ b/src/testing/pkg/reg/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -21,13 +21,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *DAO) Create(ctx context.Context, registry *dao.Registry) (int64, error ret := _m.Called(ctx, registry) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) (int64, error)); ok { + return rf(ctx, registry) + } if rf, ok := ret.Get(0).(func(context.Context, *dao.Registry) int64); ok { r0 = rf(ctx, registry) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *dao.Registry) error); ok { r1 = rf(ctx, registry) } else { @@ -77,6 +83,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) { ret := _m.Called(ctx, id) var r0 *dao.Registry + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*dao.Registry, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *dao.Registry); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*dao.Registry, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Registry, error ret := _m.Called(ctx, query) var r0 []*dao.Registry + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*dao.Registry, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*dao.Registry); ok { r0 = rf(ctx, query) } else { @@ -108,7 +121,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*dao.Registry, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/reg/manager.go b/src/testing/pkg/reg/manager.go index da01cf9c37b..ae8ea8094aa 100644 --- a/src/testing/pkg/reg/manager.go +++ b/src/testing/pkg/reg/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package manager @@ -24,13 +24,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -45,13 +48,16 @@ func (_m *Manager) Create(ctx context.Context, registry *model.Registry) (int64, ret := _m.Called(ctx, registry) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (int64, error)); ok { + return rf(ctx, registry) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) int64); ok { r0 = rf(ctx, registry) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok { r1 = rf(ctx, registry) } else { @@ -66,6 +72,10 @@ func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry) ret := _m.Called(ctx, registry) var r0 adapter.Adapter + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) (adapter.Adapter, error)); ok { + return rf(ctx, registry) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Registry) adapter.Adapter); ok { r0 = rf(ctx, registry) } else { @@ -74,7 +84,6 @@ func (_m *Manager) CreateAdapter(ctx context.Context, registry *model.Registry) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Registry) error); ok { r1 = rf(ctx, registry) } else { @@ -103,6 +112,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) { ret := _m.Called(ctx, id) var r0 *model.Registry + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Registry, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Registry); ok { r0 = rf(ctx, id) } else { @@ -111,7 +124,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Registry, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -126,6 +138,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry, ret := _m.Called(ctx, query) var r0 []*model.Registry + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Registry, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Registry); ok { r0 = rf(ctx, query) } else { @@ -134,7 +150,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Registry, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -149,6 +164,10 @@ func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*m ret := _m.Called(ctx) var r0 map[string]*model.AdapterPattern + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (map[string]*model.AdapterPattern, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) map[string]*model.AdapterPattern); ok { r0 = rf(ctx) } else { @@ -157,7 +176,6 @@ func (_m *Manager) ListRegistryProviderInfos(ctx context.Context) (map[string]*m } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -172,6 +190,10 @@ func (_m *Manager) ListRegistryProviderTypes(ctx context.Context) ([]string, err ret := _m.Called(ctx) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = rf(ctx) } else { @@ -180,7 +202,6 @@ func (_m *Manager) ListRegistryProviderTypes(ctx context.Context) ([]string, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/registry/fake_registry_client.go b/src/testing/pkg/registry/fake_registry_client.go index f9d0a68a9c5..4aa7d0313b5 100644 --- a/src/testing/pkg/registry/fake_registry_client.go +++ b/src/testing/pkg/registry/fake_registry_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package registry @@ -22,13 +22,16 @@ func (_m *Client) BlobExist(repository string, digest string) (bool, error) { ret := _m.Called(repository, digest) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(string, string) (bool, error)); ok { + return rf(repository, digest) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(repository, digest) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(string, string) error); ok { r1 = rf(repository, digest) } else { @@ -43,6 +46,10 @@ func (_m *Client) Catalog() ([]string, error) { ret := _m.Called() var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func() ([]string, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() } else { @@ -51,7 +58,6 @@ func (_m *Client) Catalog() ([]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -108,6 +114,10 @@ func (_m *Client) Do(req *http.Request) (*http.Response, error) { ret := _m.Called(req) var r0 *http.Response + var r1 error + if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok { + return rf(req) + } if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok { r0 = rf(req) } else { @@ -116,7 +126,6 @@ func (_m *Client) Do(req *http.Request) (*http.Response, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(*http.Request) error); ok { r1 = rf(req) } else { @@ -131,6 +140,10 @@ func (_m *Client) ListTags(repository string) ([]string, error) { ret := _m.Called(repository) var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok { + return rf(repository) + } if rf, ok := ret.Get(0).(func(string) []string); ok { r0 = rf(repository) } else { @@ -139,7 +152,6 @@ func (_m *Client) ListTags(repository string) ([]string, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(repository) } else { @@ -154,13 +166,17 @@ func (_m *Client) ManifestExist(repository string, reference string) (bool, *dis ret := _m.Called(repository, reference) var r0 bool + var r1 *distribution.Descriptor + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (bool, *distribution.Descriptor, error)); ok { + return rf(repository, reference) + } if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(repository, reference) } else { r0 = ret.Get(0).(bool) } - var r1 *distribution.Descriptor if rf, ok := ret.Get(1).(func(string, string) *distribution.Descriptor); ok { r1 = rf(repository, reference) } else { @@ -169,7 +185,6 @@ func (_m *Client) ManifestExist(repository string, reference string) (bool, *dis } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repository, reference) } else { @@ -212,13 +227,17 @@ func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadClos ret := _m.Called(repository, digest) var r0 int64 + var r1 io.ReadCloser + var r2 error + if rf, ok := ret.Get(0).(func(string, string) (int64, io.ReadCloser, error)); ok { + return rf(repository, digest) + } if rf, ok := ret.Get(0).(func(string, string) int64); ok { r0 = rf(repository, digest) } else { r0 = ret.Get(0).(int64) } - var r1 io.ReadCloser if rf, ok := ret.Get(1).(func(string, string) io.ReadCloser); ok { r1 = rf(repository, digest) } else { @@ -227,7 +246,6 @@ func (_m *Client) PullBlob(repository string, digest string) (int64, io.ReadClos } } - var r2 error if rf, ok := ret.Get(2).(func(string, string) error); ok { r2 = rf(repository, digest) } else { @@ -242,13 +260,17 @@ func (_m *Client) PullBlobChunk(repository string, digest string, blobSize int64 ret := _m.Called(repository, digest, blobSize, start, end) var r0 int64 + var r1 io.ReadCloser + var r2 error + if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) (int64, io.ReadCloser, error)); ok { + return rf(repository, digest, blobSize, start, end) + } if rf, ok := ret.Get(0).(func(string, string, int64, int64, int64) int64); ok { r0 = rf(repository, digest, blobSize, start, end) } else { r0 = ret.Get(0).(int64) } - var r1 io.ReadCloser if rf, ok := ret.Get(1).(func(string, string, int64, int64, int64) io.ReadCloser); ok { r1 = rf(repository, digest, blobSize, start, end) } else { @@ -257,7 +279,6 @@ func (_m *Client) PullBlobChunk(repository string, digest string, blobSize int64 } } - var r2 error if rf, ok := ret.Get(2).(func(string, string, int64, int64, int64) error); ok { r2 = rf(repository, digest, blobSize, start, end) } else { @@ -279,6 +300,11 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi ret := _m.Called(_ca...) var r0 distribution.Manifest + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(string, string, ...string) (distribution.Manifest, string, error)); ok { + return rf(repository, reference, acceptedMediaTypes...) + } if rf, ok := ret.Get(0).(func(string, string, ...string) distribution.Manifest); ok { r0 = rf(repository, reference, acceptedMediaTypes...) } else { @@ -287,14 +313,12 @@ func (_m *Client) PullManifest(repository string, reference string, acceptedMedi } } - var r1 string if rf, ok := ret.Get(1).(func(string, string, ...string) string); ok { r1 = rf(repository, reference, acceptedMediaTypes...) } else { r1 = ret.Get(1).(string) } - var r2 error if rf, ok := ret.Get(2).(func(string, string, ...string) error); ok { r2 = rf(repository, reference, acceptedMediaTypes...) } else { @@ -323,20 +347,23 @@ func (_m *Client) PushBlobChunk(repository string, digest string, blobSize int64 ret := _m.Called(repository, digest, blobSize, chunk, start, end, location) var r0 string + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) (string, int64, error)); ok { + return rf(repository, digest, blobSize, chunk, start, end, location) + } if rf, ok := ret.Get(0).(func(string, string, int64, io.Reader, int64, int64, string) string); ok { r0 = rf(repository, digest, blobSize, chunk, start, end, location) } else { r0 = ret.Get(0).(string) } - var r1 int64 if rf, ok := ret.Get(1).(func(string, string, int64, io.Reader, int64, int64, string) int64); ok { r1 = rf(repository, digest, blobSize, chunk, start, end, location) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(string, string, int64, io.Reader, int64, int64, string) error); ok { r2 = rf(repository, digest, blobSize, chunk, start, end, location) } else { @@ -351,13 +378,16 @@ func (_m *Client) PushManifest(repository string, reference string, mediaType st ret := _m.Called(repository, reference, mediaType, payload) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(string, string, string, []byte) (string, error)); ok { + return rf(repository, reference, mediaType, payload) + } if rf, ok := ret.Get(0).(func(string, string, string, []byte) string); ok { r0 = rf(repository, reference, mediaType, payload) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(string, string, string, []byte) error); ok { r1 = rf(repository, reference, mediaType, payload) } else { diff --git a/src/testing/pkg/replication/dao/dao.go b/src/testing/pkg/replication/dao/dao.go index 816270c10cb..675b39107f4 100644 --- a/src/testing/pkg/replication/dao/dao.go +++ b/src/testing/pkg/replication/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, policy *model.Policy) (int64, error) ret := _m.Called(ctx, policy) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, policy) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, policy) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, policy) } else { @@ -78,6 +84,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) { ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -86,7 +96,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Policy, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -101,6 +110,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -109,7 +122,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Policy, error } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/replication/manager.go b/src/testing/pkg/replication/manager.go index 91c4705c54e..a7ecc106e9f 100644 --- a/src/testing/pkg/replication/manager.go +++ b/src/testing/pkg/replication/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package manager @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, policy *model.Policy) (int64, err ret := _m.Called(ctx, policy) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) (int64, error)); ok { + return rf(ctx, policy) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Policy) int64); ok { r0 = rf(ctx, policy) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Policy) error); ok { r1 = rf(ctx, policy) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) { ret := _m.Called(ctx, id) var r0 *model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Policy, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Policy); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Policy, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e ret := _m.Called(ctx, query) var r0 []*model.Policy + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Policy, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Policy); ok { r0 = rf(ctx, query) } else { @@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Policy, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/repository/dao/dao.go b/src/testing/pkg/repository/dao/dao.go index be27c7807ec..01650072774 100644 --- a/src/testing/pkg/repository/dao/dao.go +++ b/src/testing/pkg/repository/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -36,13 +36,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -57,13 +60,16 @@ func (_m *DAO) Create(ctx context.Context, repository *model.RepoRecord) (int64, ret := _m.Called(ctx, repository) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok { + return rf(ctx, repository) + } if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok { r0 = rf(ctx, repository) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok { r1 = rf(ctx, repository) } else { @@ -92,6 +98,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) { ret := _m.Called(ctx, id) var r0 *model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { r0 = rf(ctx, id) } else { @@ -100,7 +110,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.RepoRecord, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -115,6 +124,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, e ret := _m.Called(ctx, query) var r0 []*model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { r0 = rf(ctx, query) } else { @@ -123,7 +136,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.RepoRecord, e } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -138,6 +150,10 @@ func (_m *DAO) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) { ret := _m.Called(ctx) var r0 []*model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok { r0 = rf(ctx) } else { @@ -146,7 +162,6 @@ func (_m *DAO) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/repository/manager.go b/src/testing/pkg/repository/manager.go index d986e1e4734..dbbf24c2ca7 100644 --- a/src/testing/pkg/repository/manager.go +++ b/src/testing/pkg/repository/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package repository @@ -35,13 +35,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -56,13 +59,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *model.RepoRecord) (int64, er ret := _m.Called(ctx, _a1) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) (int64, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *model.RepoRecord) int64); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.RepoRecord) error); ok { r1 = rf(ctx, _a1) } else { @@ -91,6 +97,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error) ret := _m.Called(ctx, id) var r0 *model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.RepoRecord, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.RepoRecord); ok { r0 = rf(ctx, id) } else { @@ -99,7 +109,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.RepoRecord, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -114,6 +123,10 @@ func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecor ret := _m.Called(ctx, name) var r0 *model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*model.RepoRecord, error)); ok { + return rf(ctx, name) + } if rf, ok := ret.Get(0).(func(context.Context, string) *model.RepoRecord); ok { r0 = rf(ctx, name) } else { @@ -122,7 +135,6 @@ func (_m *Manager) GetByName(ctx context.Context, name string) (*model.RepoRecor } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, name) } else { @@ -137,6 +149,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecor ret := _m.Called(ctx, query) var r0 []*model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.RepoRecord, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.RepoRecord); ok { r0 = rf(ctx, query) } else { @@ -145,7 +161,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.RepoRecor } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -160,6 +175,10 @@ func (_m *Manager) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, erro ret := _m.Called(ctx) var r0 []*model.RepoRecord + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]*model.RepoRecord, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []*model.RepoRecord); ok { r0 = rf(ctx) } else { @@ -168,7 +187,6 @@ func (_m *Manager) NonEmptyRepos(ctx context.Context) ([]*model.RepoRecord, erro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/robot/dao/dao.go b/src/testing/pkg/robot/dao/dao.go index abd3e88ab8e..f5239073aeb 100644 --- a/src/testing/pkg/robot/dao/dao.go +++ b/src/testing/pkg/robot/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, r *model.Robot) (int64, error) { ret := _m.Called(ctx, r) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok { + return rf(ctx, r) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok { r0 = rf(ctx, r) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok { r1 = rf(ctx, r) } else { @@ -92,6 +98,10 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) { ret := _m.Called(ctx, id) var r0 *model.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok { r0 = rf(ctx, id) } else { @@ -100,7 +110,6 @@ func (_m *DAO) Get(ctx context.Context, id int64) (*model.Robot, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -115,6 +124,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Robot, error) ret := _m.Called(ctx, query) var r0 []*model.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok { r0 = rf(ctx, query) } else { @@ -123,7 +136,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.Robot, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/robot/manager.go b/src/testing/pkg/robot/manager.go index 7e4b04ac362..1081f1efced 100644 --- a/src/testing/pkg/robot/manager.go +++ b/src/testing/pkg/robot/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package robot @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, m *model.Robot) (int64, error) { ret := _m.Called(ctx, m) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) (int64, error)); ok { + return rf(ctx, m) + } if rf, ok := ret.Get(0).(func(context.Context, *model.Robot) int64); ok { r0 = rf(ctx, m) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.Robot) error); ok { r1 = rf(ctx, m) } else { @@ -91,6 +97,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) { ret := _m.Called(ctx, id) var r0 *model.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Robot, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Robot); ok { r0 = rf(ctx, id) } else { @@ -99,7 +109,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*model.Robot, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -114,6 +123,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Robot, er ret := _m.Called(ctx, query) var r0 []*model.Robot + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.Robot, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.Robot); ok { r0 = rf(ctx, query) } else { @@ -122,7 +135,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.Robot, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/scan/export/artifact_digest_calculator.go b/src/testing/pkg/scan/export/artifact_digest_calculator.go index 62ffc288ad6..3a2c678e377 100644 --- a/src/testing/pkg/scan/export/artifact_digest_calculator.go +++ b/src/testing/pkg/scan/export/artifact_digest_calculator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package export @@ -18,13 +18,16 @@ func (_m *ArtifactDigestCalculator) Calculate(fileName string) (digest.Digest, e ret := _m.Called(fileName) var r0 digest.Digest + var r1 error + if rf, ok := ret.Get(0).(func(string) (digest.Digest, error)); ok { + return rf(fileName) + } if rf, ok := ret.Get(0).(func(string) digest.Digest); ok { r0 = rf(fileName) } else { r0 = ret.Get(0).(digest.Digest) } - var r1 error if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(fileName) } else { diff --git a/src/testing/pkg/scan/export/filter_processor.go b/src/testing/pkg/scan/export/filter_processor.go index eead8ceec6c..7afa9ae6d85 100644 --- a/src/testing/pkg/scan/export/filter_processor.go +++ b/src/testing/pkg/scan/export/filter_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package export @@ -20,6 +20,10 @@ func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []in ret := _m.Called(ctx, labelIDs, arts) var r0 []*artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) ([]*artifact.Artifact, error)); ok { + return rf(ctx, labelIDs, arts) + } if rf, ok := ret.Get(0).(func(context.Context, []int64, []*artifact.Artifact) []*artifact.Artifact); ok { r0 = rf(ctx, labelIDs, arts) } else { @@ -28,7 +32,6 @@ func (_m *FilterProcessor) ProcessLabelFilter(ctx context.Context, labelIDs []in } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, []int64, []*artifact.Artifact) error); ok { r1 = rf(ctx, labelIDs, arts) } else { @@ -43,6 +46,10 @@ func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter s ret := _m.Called(ctx, filter, projectIds) var r0 []int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]int64, error)); ok { + return rf(ctx, filter, projectIds) + } if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []int64); ok { r0 = rf(ctx, filter, projectIds) } else { @@ -51,7 +58,6 @@ func (_m *FilterProcessor) ProcessRepositoryFilter(ctx context.Context, filter s } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok { r1 = rf(ctx, filter, projectIds) } else { @@ -66,6 +72,10 @@ func (_m *FilterProcessor) ProcessTagFilter(ctx context.Context, filter string, ret := _m.Called(ctx, filter, repositoryIds) var r0 []*artifact.Artifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, []int64) ([]*artifact.Artifact, error)); ok { + return rf(ctx, filter, repositoryIds) + } if rf, ok := ret.Get(0).(func(context.Context, string, []int64) []*artifact.Artifact); ok { r0 = rf(ctx, filter, repositoryIds) } else { @@ -74,7 +84,6 @@ func (_m *FilterProcessor) ProcessTagFilter(ctx context.Context, filter string, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, []int64) error); ok { r1 = rf(ctx, filter, repositoryIds) } else { diff --git a/src/testing/pkg/scan/export/manager.go b/src/testing/pkg/scan/export/manager.go index 32b085d159a..0369376fc37 100644 --- a/src/testing/pkg/scan/export/manager.go +++ b/src/testing/pkg/scan/export/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package export @@ -19,6 +19,10 @@ func (_m *Manager) Fetch(ctx context.Context, params export.Params) ([]export.Da ret := _m.Called(ctx, params) var r0 []export.Data + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, export.Params) ([]export.Data, error)); ok { + return rf(ctx, params) + } if rf, ok := ret.Get(0).(func(context.Context, export.Params) []export.Data); ok { r0 = rf(ctx, params) } else { @@ -27,7 +31,6 @@ func (_m *Manager) Fetch(ctx context.Context, params export.Params) ([]export.Da } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, export.Params) error); ok { r1 = rf(ctx, params) } else { diff --git a/src/testing/pkg/scan/report/manager.go b/src/testing/pkg/scan/report/manager.go index a43588d59c4..5fc83d0b44b 100644 --- a/src/testing/pkg/scan/report/manager.go +++ b/src/testing/pkg/scan/report/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package report @@ -21,13 +21,16 @@ func (_m *Manager) Create(ctx context.Context, r *scan.Report) (string, error) { ret := _m.Called(ctx, r) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) (string, error)); ok { + return rf(ctx, r) + } if rf, ok := ret.Get(0).(func(context.Context, *scan.Report) string); ok { r0 = rf(ctx, r) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *scan.Report) error); ok { r1 = rf(ctx, r) } else { @@ -77,6 +80,10 @@ func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID st ret := _m.Called(ctx, digest, registrationUUID, mimeTypes) var r0 []*scan.Report + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) ([]*scan.Report, error)); ok { + return rf(ctx, digest, registrationUUID, mimeTypes) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, []string) []*scan.Report); ok { r0 = rf(ctx, digest, registrationUUID, mimeTypes) } else { @@ -85,7 +92,6 @@ func (_m *Manager) GetBy(ctx context.Context, digest string, registrationUUID st } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, []string) error); ok { r1 = rf(ctx, digest, registrationUUID, mimeTypes) } else { @@ -100,6 +106,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*scan.Report, er ret := _m.Called(ctx, query) var r0 []*scan.Report + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scan.Report, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scan.Report); ok { r0 = rf(ctx, query) } else { @@ -108,7 +118,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*scan.Report, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/scan/rest/v1/client.go b/src/testing/pkg/scan/rest/v1/client.go index 96372701a8c..3dd4d34a214 100644 --- a/src/testing/pkg/scan/rest/v1/client.go +++ b/src/testing/pkg/scan/rest/v1/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package v1 @@ -17,6 +17,10 @@ func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) { ret := _m.Called() var r0 *v1.ScannerAdapterMetadata + var r1 error + if rf, ok := ret.Get(0).(func() (*v1.ScannerAdapterMetadata, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() *v1.ScannerAdapterMetadata); ok { r0 = rf() } else { @@ -25,7 +29,6 @@ func (_m *Client) GetMetadata() (*v1.ScannerAdapterMetadata, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -40,13 +43,16 @@ func (_m *Client) GetScanReport(scanRequestID string, reportMIMEType string) (st ret := _m.Called(scanRequestID, reportMIMEType) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { + return rf(scanRequestID, reportMIMEType) + } if rf, ok := ret.Get(0).(func(string, string) string); ok { r0 = rf(scanRequestID, reportMIMEType) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(string, string) error); ok { r1 = rf(scanRequestID, reportMIMEType) } else { @@ -61,6 +67,10 @@ func (_m *Client) SubmitScan(req *v1.ScanRequest) (*v1.ScanResponse, error) { ret := _m.Called(req) var r0 *v1.ScanResponse + var r1 error + if rf, ok := ret.Get(0).(func(*v1.ScanRequest) (*v1.ScanResponse, error)); ok { + return rf(req) + } if rf, ok := ret.Get(0).(func(*v1.ScanRequest) *v1.ScanResponse); ok { r0 = rf(req) } else { @@ -69,7 +79,6 @@ func (_m *Client) SubmitScan(req *v1.ScanRequest) (*v1.ScanResponse, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(*v1.ScanRequest) error); ok { r1 = rf(req) } else { diff --git a/src/testing/pkg/scan/rest/v1/client_pool.go b/src/testing/pkg/scan/rest/v1/client_pool.go index 4b35a868dc6..39754f67f08 100644 --- a/src/testing/pkg/scan/rest/v1/client_pool.go +++ b/src/testing/pkg/scan/rest/v1/client_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package v1 @@ -17,6 +17,10 @@ func (_m *ClientPool) Get(url string, authType string, accessCredential string, ret := _m.Called(url, authType, accessCredential, skipCertVerify) var r0 v1.Client + var r1 error + if rf, ok := ret.Get(0).(func(string, string, string, bool) (v1.Client, error)); ok { + return rf(url, authType, accessCredential, skipCertVerify) + } if rf, ok := ret.Get(0).(func(string, string, string, bool) v1.Client); ok { r0 = rf(url, authType, accessCredential, skipCertVerify) } else { @@ -25,7 +29,6 @@ func (_m *ClientPool) Get(url string, authType string, accessCredential string, } } - var r1 error if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok { r1 = rf(url, authType, accessCredential, skipCertVerify) } else { diff --git a/src/testing/pkg/scan/rest/v1/request_resolver.go b/src/testing/pkg/scan/rest/v1/request_resolver.go index 2c8bd66b921..50320dbffa7 100644 --- a/src/testing/pkg/scan/rest/v1/request_resolver.go +++ b/src/testing/pkg/scan/rest/v1/request_resolver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package v1 diff --git a/src/testing/pkg/scan/rest/v1/response_handler.go b/src/testing/pkg/scan/rest/v1/response_handler.go index 2f7dff7c620..4318a2d8820 100644 --- a/src/testing/pkg/scan/rest/v1/response_handler.go +++ b/src/testing/pkg/scan/rest/v1/response_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package v1 @@ -18,6 +18,10 @@ func (_m *responseHandler) Execute(code int, resp *http.Response) ([]byte, error ret := _m.Called(code, resp) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(int, *http.Response) ([]byte, error)); ok { + return rf(code, resp) + } if rf, ok := ret.Get(0).(func(int, *http.Response) []byte); ok { r0 = rf(code, resp) } else { @@ -26,7 +30,6 @@ func (_m *responseHandler) Execute(code int, resp *http.Response) ([]byte, error } } - var r1 error if rf, ok := ret.Get(1).(func(int, *http.Response) error); ok { r1 = rf(code, resp) } else { diff --git a/src/testing/pkg/scan/scanner/manager.go b/src/testing/pkg/scan/scanner/manager.go index 256893c47cc..56f7584101f 100644 --- a/src/testing/pkg/scan/scanner/manager.go +++ b/src/testing/pkg/scan/scanner/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scanner @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, registration *daoscanner.Registra ret := _m.Called(ctx, registration) var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) (string, error)); ok { + return rf(ctx, registration) + } if rf, ok := ret.Get(0).(func(context.Context, *daoscanner.Registration) string); ok { r0 = rf(ctx, registration) } else { r0 = ret.Get(0).(string) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *daoscanner.Registration) error); ok { r1 = rf(ctx, registration) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanne ret := _m.Called(ctx, registrationUUID) var r0 *daoscanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*daoscanner.Registration, error)); ok { + return rf(ctx, registrationUUID) + } if rf, ok := ret.Get(0).(func(context.Context, string) *daoscanner.Registration); ok { r0 = rf(ctx, registrationUUID) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, registrationUUID string) (*daoscanne } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, registrationUUID) } else { @@ -100,6 +109,10 @@ func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, er ret := _m.Called(ctx) var r0 *daoscanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*daoscanner.Registration, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) *daoscanner.Registration); ok { r0 = rf(ctx) } else { @@ -108,7 +121,6 @@ func (_m *Manager) GetDefault(ctx context.Context) (*daoscanner.Registration, er } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -123,6 +135,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Regi ret := _m.Called(ctx, query) var r0 []*daoscanner.Registration + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*daoscanner.Registration, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*daoscanner.Registration); ok { r0 = rf(ctx, query) } else { @@ -131,7 +147,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*daoscanner.Regi } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/scheduler/scheduler.go b/src/testing/pkg/scheduler/scheduler.go index 3e92bfc0b4f..022b576286b 100644 --- a/src/testing/pkg/scheduler/scheduler.go +++ b/src/testing/pkg/scheduler/scheduler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package scheduler @@ -21,13 +21,16 @@ func (_m *Scheduler) CountSchedules(ctx context.Context, query *q.Query) (int64, ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,6 +45,10 @@ func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Sche ret := _m.Called(ctx, id) var r0 *scheduler.Schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*scheduler.Schedule, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *scheduler.Schedule); ok { r0 = rf(ctx, id) } else { @@ -50,7 +57,6 @@ func (_m *Scheduler) GetSchedule(ctx context.Context, id int64) (*scheduler.Sche } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -65,6 +71,10 @@ func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*sche ret := _m.Called(ctx, query) var r0 []*scheduler.Schedule + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*scheduler.Schedule, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scheduler.Schedule); ok { r0 = rf(ctx, query) } else { @@ -73,7 +83,6 @@ func (_m *Scheduler) ListSchedules(ctx context.Context, query *q.Query) ([]*sche } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -88,13 +97,16 @@ func (_m *Scheduler) Schedule(ctx context.Context, vendorType string, vendorID i ret := _m.Called(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) (int64, error)); ok { + return rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) + } if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) int64); ok { r0 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, string, string, interface{}, map[string]interface{}) error); ok { r1 = rf(ctx, vendorType, vendorID, cronType, cron, callbackFuncName, callbackFuncParams, extraAttrs) } else { diff --git a/src/testing/pkg/systemartifact/cleanup/selector.go b/src/testing/pkg/systemartifact/cleanup/selector.go index 8edf38691df..5ac5dc42d9c 100644 --- a/src/testing/pkg/systemartifact/cleanup/selector.go +++ b/src/testing/pkg/systemartifact/cleanup/selector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package cleanup @@ -21,6 +21,10 @@ func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) { ret := _m.Called(ctx) var r0 []*model.SystemArtifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]*model.SystemArtifact, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) []*model.SystemArtifact); ok { r0 = rf(ctx) } else { @@ -29,7 +33,6 @@ func (_m *Selector) List(ctx context.Context) ([]*model.SystemArtifact, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -44,6 +47,10 @@ func (_m *Selector) ListWithFilters(ctx context.Context, query *q.Query) ([]*mod ret := _m.Called(ctx, query) var r0 []*model.SystemArtifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok { r0 = rf(ctx, query) } else { @@ -52,7 +59,6 @@ func (_m *Selector) ListWithFilters(ctx context.Context, query *q.Query) ([]*mod } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/systemartifact/dao/dao.go b/src/testing/pkg/systemartifact/dao/dao.go index 8692f77c3bf..3554bdbb248 100644 --- a/src/testing/pkg/systemartifact/dao/dao.go +++ b/src/testing/pkg/systemartifact/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Create(ctx context.Context, systemArtifact *model.SystemArtifact) ret := _m.Called(ctx, systemArtifact) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) (int64, error)); ok { + return rf(ctx, systemArtifact) + } if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact) int64); ok { r0 = rf(ctx, systemArtifact) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact) error); ok { r1 = rf(ctx, systemArtifact) } else { @@ -57,6 +60,10 @@ func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest ret := _m.Called(ctx, vendor, repository, digest) var r0 *model.SystemArtifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*model.SystemArtifact, error)); ok { + return rf(ctx, vendor, repository, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *model.SystemArtifact); ok { r0 = rf(ctx, vendor, repository, digest) } else { @@ -65,7 +72,6 @@ func (_m *DAO) Get(ctx context.Context, vendor string, repository string, digest } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { r1 = rf(ctx, vendor, repository, digest) } else { @@ -80,6 +86,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifac ret := _m.Called(ctx, query) var r0 []*model.SystemArtifact + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.SystemArtifact, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.SystemArtifact); ok { r0 = rf(ctx, query) } else { @@ -88,7 +98,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*model.SystemArtifac } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -103,13 +112,16 @@ func (_m *DAO) Size(ctx context.Context) (int64, error) { ret := _m.Called(ctx) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) int64); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { diff --git a/src/testing/pkg/systemartifact/manager.go b/src/testing/pkg/systemartifact/manager.go index 819356b5d8d..418a54b1aef 100644 --- a/src/testing/pkg/systemartifact/manager.go +++ b/src/testing/pkg/systemartifact/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package systemartifact @@ -23,20 +23,23 @@ func (_m *Manager) Cleanup(ctx context.Context) (int64, int64, error) { ret := _m.Called(ctx) var r0 int64 + var r1 int64 + var r2 error + if rf, ok := ret.Get(0).(func(context.Context) (int64, int64, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) int64); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(int64) } - var r1 int64 if rf, ok := ret.Get(1).(func(context.Context) int64); ok { r1 = rf(ctx) } else { r1 = ret.Get(1).(int64) } - var r2 error if rf, ok := ret.Get(2).(func(context.Context) error); ok { r2 = rf(ctx) } else { @@ -51,13 +54,16 @@ func (_m *Manager) Create(ctx context.Context, artifactRecord *model.SystemArtif ret := _m.Called(ctx, artifactRecord, reader) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) (int64, error)); ok { + return rf(ctx, artifactRecord, reader) + } if rf, ok := ret.Get(0).(func(context.Context, *model.SystemArtifact, io.Reader) int64); ok { r0 = rf(ctx, artifactRecord, reader) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *model.SystemArtifact, io.Reader) error); ok { r1 = rf(ctx, artifactRecord, reader) } else { @@ -86,13 +92,16 @@ func (_m *Manager) Exists(ctx context.Context, vendor string, repository string, ret := _m.Called(ctx, vendor, repository, digest) var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok { + return rf(ctx, vendor, repository, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok { r0 = rf(ctx, vendor, repository, digest) } else { r0 = ret.Get(0).(bool) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { r1 = rf(ctx, vendor, repository, digest) } else { @@ -123,13 +132,16 @@ func (_m *Manager) GetStorageSize(ctx context.Context) (int64, error) { ret := _m.Called(ctx) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok { + return rf(ctx) + } if rf, ok := ret.Get(0).(func(context.Context) int64); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -160,6 +172,10 @@ func (_m *Manager) Read(ctx context.Context, vendor string, repository string, d ret := _m.Called(ctx, vendor, repository, digest) var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (io.ReadCloser, error)); ok { + return rf(ctx, vendor, repository, digest) + } if rf, ok := ret.Get(0).(func(context.Context, string, string, string) io.ReadCloser); ok { r0 = rf(ctx, vendor, repository, digest) } else { @@ -168,7 +184,6 @@ func (_m *Manager) Read(ctx context.Context, vendor string, repository string, d } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { r1 = rf(ctx, vendor, repository, digest) } else { diff --git a/src/testing/pkg/task/execution_manager.go b/src/testing/pkg/task/execution_manager.go index 3b40d96605f..d09ac521450 100644 --- a/src/testing/pkg/task/execution_manager.go +++ b/src/testing/pkg/task/execution_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -23,13 +23,16 @@ func (_m *ExecutionManager) Count(ctx context.Context, query *q.Query) (int64, e ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -51,13 +54,16 @@ func (_m *ExecutionManager) Create(ctx context.Context, vendorType string, vendo ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) (int64, error)); ok { + return rf(ctx, vendorType, vendorID, trigger, extraAttrs...) + } if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) int64); ok { r0 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, ...map[string]interface{}) error); ok { r1 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...) } else { @@ -100,6 +106,10 @@ func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution, ret := _m.Called(ctx, id) var r0 *task.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Execution, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Execution); ok { r0 = rf(ctx, id) } else { @@ -108,7 +118,6 @@ func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution, } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -123,6 +132,10 @@ func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.E ret := _m.Called(ctx, query) var r0 []*task.Execution + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Execution, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Execution); ok { r0 = rf(ctx, query) } else { @@ -131,7 +144,6 @@ func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.E } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/task/manager.go b/src/testing/pkg/task/manager.go index aee36e265bb..53a5c07dbdb 100644 --- a/src/testing/pkg/task/manager.go +++ b/src/testing/pkg/task/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package task @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -49,13 +52,16 @@ func (_m *Manager) Create(ctx context.Context, executionID int64, job *task.Job, ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) (int64, error)); ok { + return rf(ctx, executionID, job, extraAttrs...) + } if rf, ok := ret.Get(0).(func(context.Context, int64, *task.Job, ...map[string]interface{}) int64); ok { r0 = rf(ctx, executionID, job, extraAttrs...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64, *task.Job, ...map[string]interface{}) error); ok { r1 = rf(ctx, executionID, job, extraAttrs...) } else { @@ -70,6 +76,10 @@ func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType ret := _m.Called(ctx, vendorType, status) var r0 []int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]int64, error)); ok { + return rf(ctx, vendorType, status) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) []int64); ok { r0 = rf(ctx, vendorType, status) } else { @@ -78,7 +88,6 @@ func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, vendorType, status) } else { @@ -93,6 +102,10 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) { ret := _m.Called(ctx, id) var r0 *task.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (*task.Task, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Task); ok { r0 = rf(ctx, id) } else { @@ -101,7 +114,6 @@ func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -116,6 +128,10 @@ func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) { ret := _m.Called(ctx, id) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) ([]byte, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int64) []byte); ok { r0 = rf(ctx, id) } else { @@ -124,7 +140,6 @@ func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = rf(ctx, id) } else { @@ -139,6 +154,10 @@ func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, err ret := _m.Called(ctx, jobID) var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { + return rf(ctx, jobID) + } if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { r0 = rf(ctx, jobID) } else { @@ -147,7 +166,6 @@ func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, err } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, jobID) } else { @@ -162,6 +180,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, erro ret := _m.Called(ctx, query) var r0 []*task.Task + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*task.Task, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Task); ok { r0 = rf(ctx, query) } else { @@ -170,7 +192,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, erro } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/user/dao/dao.go b/src/testing/pkg/user/dao/dao.go index 0d04c3ecc6e..e2c72d30247 100644 --- a/src/testing/pkg/user/dao/dao.go +++ b/src/testing/pkg/user/dao/dao.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package dao @@ -22,13 +22,16 @@ func (_m *DAO) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -43,13 +46,16 @@ func (_m *DAO) Create(ctx context.Context, user *models.User) (int, error) { ret := _m.Called(ctx, user) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *models.User) (int, error)); ok { + return rf(ctx, user) + } if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok { r0 = rf(ctx, user) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok { r1 = rf(ctx, user) } else { @@ -78,6 +84,10 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*models.User, error) ret := _m.Called(ctx, query) var r0 []*models.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*models.User, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.User); ok { r0 = rf(ctx, query) } else { @@ -86,7 +96,6 @@ func (_m *DAO) List(ctx context.Context, query *q.Query) ([]*models.User, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { diff --git a/src/testing/pkg/user/manager.go b/src/testing/pkg/user/manager.go index a0015455672..5b98ff0f69f 100644 --- a/src/testing/pkg/user/manager.go +++ b/src/testing/pkg/user/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package user @@ -31,13 +31,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query, options ...models. ret := _m.Called(_ca...) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) (int64, error)); ok { + return rf(ctx, query, options...) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) int64); ok { r0 = rf(ctx, query, options...) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok { r1 = rf(ctx, query, options...) } else { @@ -52,13 +55,16 @@ func (_m *Manager) Create(ctx context.Context, _a1 *commonmodels.User) (int, err ret := _m.Called(ctx, _a1) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *commonmodels.User) (int, error)); ok { + return rf(ctx, _a1) + } if rf, ok := ret.Get(0).(func(context.Context, *commonmodels.User) int); ok { r0 = rf(ctx, _a1) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *commonmodels.User) error); ok { r1 = rf(ctx, _a1) } else { @@ -101,6 +107,10 @@ func (_m *Manager) Get(ctx context.Context, id int) (*commonmodels.User, error) ret := _m.Called(ctx, id) var r0 *commonmodels.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int) (*commonmodels.User, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int) *commonmodels.User); ok { r0 = rf(ctx, id) } else { @@ -109,7 +119,6 @@ func (_m *Manager) Get(ctx context.Context, id int) (*commonmodels.User, error) } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = rf(ctx, id) } else { @@ -124,6 +133,10 @@ func (_m *Manager) GetByName(ctx context.Context, username string) (*commonmodel ret := _m.Called(ctx, username) var r0 *commonmodels.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*commonmodels.User, error)); ok { + return rf(ctx, username) + } if rf, ok := ret.Get(0).(func(context.Context, string) *commonmodels.User); ok { r0 = rf(ctx, username) } else { @@ -132,7 +145,6 @@ func (_m *Manager) GetByName(ctx context.Context, username string) (*commonmodel } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, username) } else { @@ -154,6 +166,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query, options ...models.O ret := _m.Called(_ca...) var r0 commonmodels.Users + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) (commonmodels.Users, error)); ok { + return rf(ctx, query, options...) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query, ...models.Option) commonmodels.Users); ok { r0 = rf(ctx, query, options...) } else { @@ -162,7 +178,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query, options ...models.O } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query, ...models.Option) error); ok { r1 = rf(ctx, query, options...) } else { @@ -177,6 +192,10 @@ func (_m *Manager) MatchLocalPassword(ctx context.Context, username string, pass ret := _m.Called(ctx, username, password) var r0 *commonmodels.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) (*commonmodels.User, error)); ok { + return rf(ctx, username, password) + } if rf, ok := ret.Get(0).(func(context.Context, string, string) *commonmodels.User); ok { r0 = rf(ctx, username, password) } else { @@ -185,7 +204,6 @@ func (_m *Manager) MatchLocalPassword(ctx context.Context, username string, pass } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, username, password) } else { diff --git a/src/testing/pkg/usergroup/fake_usergroup_manager.go b/src/testing/pkg/usergroup/fake_usergroup_manager.go index 3127d31df91..f340f6ef92d 100644 --- a/src/testing/pkg/usergroup/fake_usergroup_manager.go +++ b/src/testing/pkg/usergroup/fake_usergroup_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package usergroup @@ -21,13 +21,16 @@ func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) (int64, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -42,13 +45,16 @@ func (_m *Manager) Create(ctx context.Context, userGroup model.UserGroup) (int, ret := _m.Called(ctx, userGroup) var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, model.UserGroup) (int, error)); ok { + return rf(ctx, userGroup) + } if rf, ok := ret.Get(0).(func(context.Context, model.UserGroup) int); ok { r0 = rf(ctx, userGroup) } else { r0 = ret.Get(0).(int) } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, model.UserGroup) error); ok { r1 = rf(ctx, userGroup) } else { @@ -77,6 +83,10 @@ func (_m *Manager) Get(ctx context.Context, id int) (*model.UserGroup, error) { ret := _m.Called(ctx, id) var r0 *model.UserGroup + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int) (*model.UserGroup, error)); ok { + return rf(ctx, id) + } if rf, ok := ret.Get(0).(func(context.Context, int) *model.UserGroup); ok { r0 = rf(ctx, id) } else { @@ -85,7 +95,6 @@ func (_m *Manager) Get(ctx context.Context, id int) (*model.UserGroup, error) { } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = rf(ctx, id) } else { @@ -100,6 +109,10 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.UserGroup ret := _m.Called(ctx, query) var r0 []*model.UserGroup + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *q.Query) ([]*model.UserGroup, error)); ok { + return rf(ctx, query) + } if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*model.UserGroup); ok { r0 = rf(ctx, query) } else { @@ -108,7 +121,6 @@ func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*model.UserGroup } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { @@ -137,6 +149,10 @@ func (_m *Manager) Populate(ctx context.Context, userGroups []model.UserGroup) ( ret := _m.Called(ctx, userGroups) var r0 []int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []model.UserGroup) ([]int, error)); ok { + return rf(ctx, userGroups) + } if rf, ok := ret.Get(0).(func(context.Context, []model.UserGroup) []int); ok { r0 = rf(ctx, userGroups) } else { @@ -145,7 +161,6 @@ func (_m *Manager) Populate(ctx context.Context, userGroups []model.UserGroup) ( } } - var r1 error if rf, ok := ret.Get(1).(func(context.Context, []model.UserGroup) error); ok { r1 = rf(ctx, userGroups) } else {