From bcc483ea574748843868862f9e1493a743b8c4ed Mon Sep 17 00:00:00 2001 From: William Van Hevelingen Date: Sat, 23 Mar 2024 21:29:53 -0700 Subject: [PATCH] chore(deps): bump github.com/vektra/mockery from v2.26.0 to v2.42.0 (#12713) Signed-off-by: william.vanhevelingen Signed-off-by: William Van Hevelingen --- Makefile | 2 +- dev/nix/flake.nix | 4 +- persist/sqldb/mocks/WorkflowArchive.go | 47 +++++++++-- .../workflow/mocks/WorkflowServiceClient.go | 79 +++++++++++++++++-- .../mocks/WorkflowTemplateServiceClient.go | 35 ++++++-- server/auth/mocks/Gatekeeper.go | 27 +++++-- server/auth/sso/mocks/Interface.go | 19 +++-- .../artifactrepositories/mocks/Interface.go | 19 +++-- .../mocks/ContainerRuntimeExecutor.go | 31 ++++++-- workflow/sync/mocks/Throttler.go | 19 +++-- 10 files changed, 231 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index 25f354e7d31d..c466cc87ba73 100644 --- a/Makefile +++ b/Makefile @@ -291,7 +291,7 @@ swagger: \ $(GOPATH)/bin/mockery: # update this in Nix when upgrading it here ifneq ($(USE_NIX), true) - go install github.com/vektra/mockery/v2@v2.26.0 + go install github.com/vektra/mockery/v2@v2.42.0 endif $(GOPATH)/bin/controller-gen: # update this in Nix when upgrading it here diff --git a/dev/nix/flake.nix b/dev/nix/flake.nix index c91cfa58f203..cdd9217b18e5 100644 --- a/dev/nix/flake.nix +++ b/dev/nix/flake.nix @@ -196,13 +196,13 @@ mockery = pkgs.buildGoModule rec { pname = "mockery"; - version = "2.26.0"; # upgrade this in the Makefile if upgraded here + version = "2.42.0"; # upgrade this in the Makefile if upgraded here src = pkgs.fetchFromGitHub { owner = "vektra"; repo = "mockery"; rev = "v${version}"; - sha256 = "sha256-3wJ7XY/wfVXB4nEHLqEtNRscow/KrAo79sr2OgJisSY="; + sha256 = "sha256-wwt7rhHWPlYtvudWKb8vk8t19MeN7AMfMugs0XeBDVk="; }; doCheck = false; vendorHash = "sha256-J7eL2AQ6v5nG2lZOSSZQOTKBhfk7GtDtqZ7Felo0l54="; diff --git a/persist/sqldb/mocks/WorkflowArchive.go b/persist/sqldb/mocks/WorkflowArchive.go index 16edf80c38fd..bf9aa0c7a32c 100644 --- a/persist/sqldb/mocks/WorkflowArchive.go +++ b/persist/sqldb/mocks/WorkflowArchive.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type WorkflowArchive struct { func (_m *WorkflowArchive) ArchiveWorkflow(wf *v1alpha1.Workflow) error { ret := _m.Called(wf) + if len(ret) == 0 { + panic("no return value specified for ArchiveWorkflow") + } + var r0 error if rf, ok := ret.Get(0).(func(*v1alpha1.Workflow) error); ok { r0 = rf(wf) @@ -34,6 +38,10 @@ func (_m *WorkflowArchive) ArchiveWorkflow(wf *v1alpha1.Workflow) error { func (_m *WorkflowArchive) CountWorkflows(namespace string, name string, namePrefix string, minStartAt time.Time, maxStartAt time.Time, labelRequirements labels.Requirements) (int64, error) { ret := _m.Called(namespace, name, namePrefix, minStartAt, maxStartAt, labelRequirements) + if len(ret) == 0 { + panic("no return value specified for CountWorkflows") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(string, string, string, time.Time, time.Time, labels.Requirements) (int64, error)); ok { @@ -58,6 +66,10 @@ func (_m *WorkflowArchive) CountWorkflows(namespace string, name string, namePre func (_m *WorkflowArchive) DeleteExpiredWorkflows(ttl time.Duration) error { ret := _m.Called(ttl) + if len(ret) == 0 { + panic("no return value specified for DeleteExpiredWorkflows") + } + var r0 error if rf, ok := ret.Get(0).(func(time.Duration) error); ok { r0 = rf(ttl) @@ -72,6 +84,10 @@ func (_m *WorkflowArchive) DeleteExpiredWorkflows(ttl time.Duration) error { func (_m *WorkflowArchive) DeleteWorkflow(uid string) error { ret := _m.Called(uid) + if len(ret) == 0 { + panic("no return value specified for DeleteWorkflow") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(uid) @@ -86,6 +102,10 @@ func (_m *WorkflowArchive) DeleteWorkflow(uid string) error { func (_m *WorkflowArchive) GetWorkflow(uid string, namespace string, name string) (*v1alpha1.Workflow, error) { ret := _m.Called(uid, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (*v1alpha1.Workflow, error)); ok { @@ -112,6 +132,10 @@ func (_m *WorkflowArchive) GetWorkflow(uid string, namespace string, name string func (_m *WorkflowArchive) IsEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -126,6 +150,10 @@ func (_m *WorkflowArchive) IsEnabled() bool { func (_m *WorkflowArchive) ListWorkflows(namespace string, name string, namePrefix string, minStartAt time.Time, maxStartAt time.Time, labelRequirements labels.Requirements, limit int, offset int) (v1alpha1.Workflows, error) { ret := _m.Called(namespace, name, namePrefix, minStartAt, maxStartAt, labelRequirements, limit, offset) + if len(ret) == 0 { + panic("no return value specified for ListWorkflows") + } + var r0 v1alpha1.Workflows var r1 error if rf, ok := ret.Get(0).(func(string, string, string, time.Time, time.Time, labels.Requirements, int, int) (v1alpha1.Workflows, error)); ok { @@ -152,6 +180,10 @@ func (_m *WorkflowArchive) ListWorkflows(namespace string, name string, namePref func (_m *WorkflowArchive) ListWorkflowsLabelKeys() (*v1alpha1.LabelKeys, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ListWorkflowsLabelKeys") + } + var r0 *v1alpha1.LabelKeys var r1 error if rf, ok := ret.Get(0).(func() (*v1alpha1.LabelKeys, error)); ok { @@ -178,6 +210,10 @@ func (_m *WorkflowArchive) ListWorkflowsLabelKeys() (*v1alpha1.LabelKeys, error) func (_m *WorkflowArchive) ListWorkflowsLabelValues(key string) (*v1alpha1.LabelValues, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for ListWorkflowsLabelValues") + } + var r0 *v1alpha1.LabelValues var r1 error if rf, ok := ret.Get(0).(func(string) (*v1alpha1.LabelValues, error)); ok { @@ -200,13 +236,12 @@ func (_m *WorkflowArchive) ListWorkflowsLabelValues(key string) (*v1alpha1.Label return r0, r1 } -type mockConstructorTestingTNewWorkflowArchive interface { +// NewWorkflowArchive creates a new instance of WorkflowArchive. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWorkflowArchive(t interface { mock.TestingT Cleanup(func()) -} - -// NewWorkflowArchive creates a new instance of WorkflowArchive. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWorkflowArchive(t mockConstructorTestingTNewWorkflowArchive) *WorkflowArchive { +}) *WorkflowArchive { mock := &WorkflowArchive{} mock.Mock.Test(t) diff --git a/pkg/apiclient/workflow/mocks/WorkflowServiceClient.go b/pkg/apiclient/workflow/mocks/WorkflowServiceClient.go index 0e5ee916a994..9a3558a05143 100644 --- a/pkg/apiclient/workflow/mocks/WorkflowServiceClient.go +++ b/pkg/apiclient/workflow/mocks/WorkflowServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -30,6 +30,10 @@ func (_m *WorkflowServiceClient) CreateWorkflow(ctx context.Context, in *workflo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowCreateRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -63,6 +67,10 @@ func (_m *WorkflowServiceClient) DeleteWorkflow(ctx context.Context, in *workflo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteWorkflow") + } + var r0 *workflow.WorkflowDeleteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowDeleteRequest, ...grpc.CallOption) (*workflow.WorkflowDeleteResponse, error)); ok { @@ -96,6 +104,10 @@ func (_m *WorkflowServiceClient) GetWorkflow(ctx context.Context, in *workflow.W _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowGetRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -129,6 +141,10 @@ func (_m *WorkflowServiceClient) LintWorkflow(ctx context.Context, in *workflow. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for LintWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowLintRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -162,6 +178,10 @@ func (_m *WorkflowServiceClient) ListWorkflows(ctx context.Context, in *workflow _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListWorkflows") + } + var r0 *v1alpha1.WorkflowList var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowListRequest, ...grpc.CallOption) (*v1alpha1.WorkflowList, error)); ok { @@ -195,6 +215,10 @@ func (_m *WorkflowServiceClient) PodLogs(ctx context.Context, in *workflow.Workf _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PodLogs") + } + var r0 workflow.WorkflowService_PodLogsClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowLogRequest, ...grpc.CallOption) (workflow.WorkflowService_PodLogsClient, error)); ok { @@ -228,6 +252,10 @@ func (_m *WorkflowServiceClient) ResubmitWorkflow(ctx context.Context, in *workf _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ResubmitWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowResubmitRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -261,6 +289,10 @@ func (_m *WorkflowServiceClient) ResumeWorkflow(ctx context.Context, in *workflo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ResumeWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowResumeRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -294,6 +326,10 @@ func (_m *WorkflowServiceClient) RetryWorkflow(ctx context.Context, in *workflow _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RetryWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowRetryRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -327,6 +363,10 @@ func (_m *WorkflowServiceClient) SetWorkflow(ctx context.Context, in *workflow.W _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SetWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowSetRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -360,6 +400,10 @@ func (_m *WorkflowServiceClient) StopWorkflow(ctx context.Context, in *workflow. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StopWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowStopRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -393,6 +437,10 @@ func (_m *WorkflowServiceClient) SubmitWorkflow(ctx context.Context, in *workflo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubmitWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowSubmitRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -426,6 +474,10 @@ func (_m *WorkflowServiceClient) SuspendWorkflow(ctx context.Context, in *workfl _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SuspendWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowSuspendRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -459,6 +511,10 @@ func (_m *WorkflowServiceClient) TerminateWorkflow(ctx context.Context, in *work _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for TerminateWorkflow") + } + var r0 *v1alpha1.Workflow var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowTerminateRequest, ...grpc.CallOption) (*v1alpha1.Workflow, error)); ok { @@ -492,6 +548,10 @@ func (_m *WorkflowServiceClient) WatchEvents(ctx context.Context, in *workflow.W _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WatchEvents") + } + var r0 workflow.WorkflowService_WatchEventsClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WatchEventsRequest, ...grpc.CallOption) (workflow.WorkflowService_WatchEventsClient, error)); ok { @@ -525,6 +585,10 @@ func (_m *WorkflowServiceClient) WatchWorkflows(ctx context.Context, in *workflo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WatchWorkflows") + } + var r0 workflow.WorkflowService_WatchWorkflowsClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WatchWorkflowsRequest, ...grpc.CallOption) (workflow.WorkflowService_WatchWorkflowsClient, error)); ok { @@ -558,6 +622,10 @@ func (_m *WorkflowServiceClient) WorkflowLogs(ctx context.Context, in *workflow. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WorkflowLogs") + } + var r0 workflow.WorkflowService_WorkflowLogsClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflow.WorkflowLogRequest, ...grpc.CallOption) (workflow.WorkflowService_WorkflowLogsClient, error)); ok { @@ -580,13 +648,12 @@ func (_m *WorkflowServiceClient) WorkflowLogs(ctx context.Context, in *workflow. return r0, r1 } -type mockConstructorTestingTNewWorkflowServiceClient interface { +// NewWorkflowServiceClient creates a new instance of WorkflowServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWorkflowServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewWorkflowServiceClient creates a new instance of WorkflowServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWorkflowServiceClient(t mockConstructorTestingTNewWorkflowServiceClient) *WorkflowServiceClient { +}) *WorkflowServiceClient { mock := &WorkflowServiceClient{} mock.Mock.Test(t) diff --git a/pkg/apiclient/workflowtemplate/mocks/WorkflowTemplateServiceClient.go b/pkg/apiclient/workflowtemplate/mocks/WorkflowTemplateServiceClient.go index 1e5a68880d64..5009031aea97 100644 --- a/pkg/apiclient/workflowtemplate/mocks/WorkflowTemplateServiceClient.go +++ b/pkg/apiclient/workflowtemplate/mocks/WorkflowTemplateServiceClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -30,6 +30,10 @@ func (_m *WorkflowTemplateServiceClient) CreateWorkflowTemplate(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateWorkflowTemplate") + } + var r0 *v1alpha1.WorkflowTemplate var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateCreateRequest, ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error)); ok { @@ -63,6 +67,10 @@ func (_m *WorkflowTemplateServiceClient) DeleteWorkflowTemplate(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteWorkflowTemplate") + } + var r0 *workflowtemplate.WorkflowTemplateDeleteResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateDeleteRequest, ...grpc.CallOption) (*workflowtemplate.WorkflowTemplateDeleteResponse, error)); ok { @@ -96,6 +104,10 @@ func (_m *WorkflowTemplateServiceClient) GetWorkflowTemplate(ctx context.Context _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetWorkflowTemplate") + } + var r0 *v1alpha1.WorkflowTemplate var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateGetRequest, ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error)); ok { @@ -129,6 +141,10 @@ func (_m *WorkflowTemplateServiceClient) LintWorkflowTemplate(ctx context.Contex _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for LintWorkflowTemplate") + } + var r0 *v1alpha1.WorkflowTemplate var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateLintRequest, ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error)); ok { @@ -162,6 +178,10 @@ func (_m *WorkflowTemplateServiceClient) ListWorkflowTemplates(ctx context.Conte _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListWorkflowTemplates") + } + var r0 *v1alpha1.WorkflowTemplateList var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateListRequest, ...grpc.CallOption) (*v1alpha1.WorkflowTemplateList, error)); ok { @@ -195,6 +215,10 @@ func (_m *WorkflowTemplateServiceClient) UpdateWorkflowTemplate(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateWorkflowTemplate") + } + var r0 *v1alpha1.WorkflowTemplate var r1 error if rf, ok := ret.Get(0).(func(context.Context, *workflowtemplate.WorkflowTemplateUpdateRequest, ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error)); ok { @@ -217,13 +241,12 @@ func (_m *WorkflowTemplateServiceClient) UpdateWorkflowTemplate(ctx context.Cont return r0, r1 } -type mockConstructorTestingTNewWorkflowTemplateServiceClient interface { +// NewWorkflowTemplateServiceClient creates a new instance of WorkflowTemplateServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWorkflowTemplateServiceClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewWorkflowTemplateServiceClient creates a new instance of WorkflowTemplateServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWorkflowTemplateServiceClient(t mockConstructorTestingTNewWorkflowTemplateServiceClient) *WorkflowTemplateServiceClient { +}) *WorkflowTemplateServiceClient { mock := &WorkflowTemplateServiceClient{} mock.Mock.Test(t) diff --git a/server/auth/mocks/Gatekeeper.go b/server/auth/mocks/Gatekeeper.go index f9cbf136761f..7514079716ba 100644 --- a/server/auth/mocks/Gatekeeper.go +++ b/server/auth/mocks/Gatekeeper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type Gatekeeper struct { func (_m *Gatekeeper) Context(ctx context.Context) (context.Context, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context var r1 error if rf, ok := ret.Get(0).(func(context.Context) (context.Context, error)); ok { @@ -45,6 +49,10 @@ func (_m *Gatekeeper) Context(ctx context.Context) (context.Context, error) { func (_m *Gatekeeper) ContextWithRequest(ctx context.Context, req interface{}) (context.Context, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for ContextWithRequest") + } + var r0 context.Context var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}) (context.Context, error)); ok { @@ -71,6 +79,10 @@ func (_m *Gatekeeper) ContextWithRequest(ctx context.Context, req interface{}) ( func (_m *Gatekeeper) StreamServerInterceptor() grpc.StreamServerInterceptor { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StreamServerInterceptor") + } + var r0 grpc.StreamServerInterceptor if rf, ok := ret.Get(0).(func() grpc.StreamServerInterceptor); ok { r0 = rf() @@ -87,6 +99,10 @@ func (_m *Gatekeeper) StreamServerInterceptor() grpc.StreamServerInterceptor { func (_m *Gatekeeper) UnaryServerInterceptor() grpc.UnaryServerInterceptor { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for UnaryServerInterceptor") + } + var r0 grpc.UnaryServerInterceptor if rf, ok := ret.Get(0).(func() grpc.UnaryServerInterceptor); ok { r0 = rf() @@ -99,13 +115,12 @@ func (_m *Gatekeeper) UnaryServerInterceptor() grpc.UnaryServerInterceptor { return r0 } -type mockConstructorTestingTNewGatekeeper interface { +// NewGatekeeper creates a new instance of Gatekeeper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewGatekeeper(t interface { mock.TestingT Cleanup(func()) -} - -// NewGatekeeper creates a new instance of Gatekeeper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGatekeeper(t mockConstructorTestingTNewGatekeeper) *Gatekeeper { +}) *Gatekeeper { mock := &Gatekeeper{} mock.Mock.Test(t) diff --git a/server/auth/sso/mocks/Interface.go b/server/auth/sso/mocks/Interface.go index 205f8fd6d5d2..ed23256c851a 100644 --- a/server/auth/sso/mocks/Interface.go +++ b/server/auth/sso/mocks/Interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type Interface struct { func (_m *Interface) Authorize(authorization string) (*types.Claims, error) { ret := _m.Called(authorization) + if len(ret) == 0 { + panic("no return value specified for Authorize") + } + var r0 *types.Claims var r1 error if rf, ok := ret.Get(0).(func(string) (*types.Claims, error)); ok { @@ -55,6 +59,10 @@ func (_m *Interface) HandleRedirect(writer http.ResponseWriter, request *http.Re func (_m *Interface) IsRBACEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRBACEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -65,13 +73,12 @@ func (_m *Interface) IsRBACEnabled() bool { return r0 } -type mockConstructorTestingTNewInterface interface { +// NewInterface creates a new instance of Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewInterface(t interface { mock.TestingT Cleanup(func()) -} - -// NewInterface creates a new instance of Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInterface(t mockConstructorTestingTNewInterface) *Interface { +}) *Interface { mock := &Interface{} mock.Mock.Test(t) diff --git a/workflow/artifactrepositories/mocks/Interface.go b/workflow/artifactrepositories/mocks/Interface.go index c392ce6eb540..b00ab398b0d3 100644 --- a/workflow/artifactrepositories/mocks/Interface.go +++ b/workflow/artifactrepositories/mocks/Interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type Interface struct { func (_m *Interface) Get(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRefStatus) (*v1alpha1.ArtifactRepository, error) { ret := _m.Called(ctx, ref) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1alpha1.ArtifactRepository var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRefStatus) (*v1alpha1.ArtifactRepository, error)); ok { @@ -44,6 +48,10 @@ func (_m *Interface) Get(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRe func (_m *Interface) Resolve(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRef, workflowNamespace string) (*v1alpha1.ArtifactRepositoryRefStatus, error) { ret := _m.Called(ctx, ref, workflowNamespace) + if len(ret) == 0 { + panic("no return value specified for Resolve") + } + var r0 *v1alpha1.ArtifactRepositoryRefStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRef, string) (*v1alpha1.ArtifactRepositoryRefStatus, error)); ok { @@ -66,13 +74,12 @@ func (_m *Interface) Resolve(ctx context.Context, ref *v1alpha1.ArtifactReposito return r0, r1 } -type mockConstructorTestingTNewInterface interface { +// NewInterface creates a new instance of Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewInterface(t interface { mock.TestingT Cleanup(func()) -} - -// NewInterface creates a new instance of Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInterface(t mockConstructorTestingTNewInterface) *Interface { +}) *Interface { mock := &Interface{} mock.Mock.Test(t) diff --git a/workflow/executor/mocks/ContainerRuntimeExecutor.go b/workflow/executor/mocks/ContainerRuntimeExecutor.go index 6eb7026e866c..011a2dccc430 100644 --- a/workflow/executor/mocks/ContainerRuntimeExecutor.go +++ b/workflow/executor/mocks/ContainerRuntimeExecutor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ type ContainerRuntimeExecutor struct { func (_m *ContainerRuntimeExecutor) CopyFile(containerName string, sourcePath string, destPath string, compressionLevel int) error { ret := _m.Called(containerName, sourcePath, destPath, compressionLevel) + if len(ret) == 0 { + panic("no return value specified for CopyFile") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, string, int) error); ok { r0 = rf(containerName, sourcePath, destPath, compressionLevel) @@ -35,6 +39,10 @@ func (_m *ContainerRuntimeExecutor) CopyFile(containerName string, sourcePath st func (_m *ContainerRuntimeExecutor) GetFileContents(containerName string, sourcePath string) (string, error) { ret := _m.Called(containerName, sourcePath) + if len(ret) == 0 { + panic("no return value specified for GetFileContents") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string, string) (string, error)); ok { @@ -59,6 +67,10 @@ func (_m *ContainerRuntimeExecutor) GetFileContents(containerName string, source func (_m *ContainerRuntimeExecutor) GetOutputStream(ctx context.Context, containerName string, combinedOutput bool) (io.ReadCloser, error) { ret := _m.Called(ctx, containerName, combinedOutput) + if len(ret) == 0 { + panic("no return value specified for GetOutputStream") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool) (io.ReadCloser, error)); ok { @@ -85,6 +97,10 @@ func (_m *ContainerRuntimeExecutor) GetOutputStream(ctx context.Context, contain func (_m *ContainerRuntimeExecutor) Kill(ctx context.Context, containerNames []string, terminationGracePeriodDuration time.Duration) error { ret := _m.Called(ctx, containerNames, terminationGracePeriodDuration) + if len(ret) == 0 { + panic("no return value specified for Kill") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []string, time.Duration) error); ok { r0 = rf(ctx, containerNames, terminationGracePeriodDuration) @@ -99,6 +115,10 @@ func (_m *ContainerRuntimeExecutor) Kill(ctx context.Context, containerNames []s func (_m *ContainerRuntimeExecutor) Wait(ctx context.Context, containerNames []string) error { ret := _m.Called(ctx, containerNames) + if len(ret) == 0 { + panic("no return value specified for Wait") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok { r0 = rf(ctx, containerNames) @@ -109,13 +129,12 @@ func (_m *ContainerRuntimeExecutor) Wait(ctx context.Context, containerNames []s return r0 } -type mockConstructorTestingTNewContainerRuntimeExecutor interface { +// NewContainerRuntimeExecutor creates a new instance of ContainerRuntimeExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContainerRuntimeExecutor(t interface { mock.TestingT Cleanup(func()) -} - -// NewContainerRuntimeExecutor creates a new instance of ContainerRuntimeExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContainerRuntimeExecutor(t mockConstructorTestingTNewContainerRuntimeExecutor) *ContainerRuntimeExecutor { +}) *ContainerRuntimeExecutor { mock := &ContainerRuntimeExecutor{} mock.Mock.Test(t) diff --git a/workflow/sync/mocks/Throttler.go b/workflow/sync/mocks/Throttler.go index 61399ac62720..c6bd25cf395e 100644 --- a/workflow/sync/mocks/Throttler.go +++ b/workflow/sync/mocks/Throttler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.26.0. DO NOT EDIT. +// Code generated by mockery v2.42.0. DO NOT EDIT. package mocks @@ -24,6 +24,10 @@ func (_m *Throttler) Add(key string, priority int32, creationTime time.Time) { func (_m *Throttler) Admit(key string) bool { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Admit") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(key) @@ -38,6 +42,10 @@ func (_m *Throttler) Admit(key string) bool { func (_m *Throttler) Init(wfs []v1alpha1.Workflow) error { ret := _m.Called(wfs) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func([]v1alpha1.Workflow) error); ok { r0 = rf(wfs) @@ -53,13 +61,12 @@ func (_m *Throttler) Remove(key string) { _m.Called(key) } -type mockConstructorTestingTNewThrottler interface { +// NewThrottler creates a new instance of Throttler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewThrottler(t interface { mock.TestingT Cleanup(func()) -} - -// NewThrottler creates a new instance of Throttler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewThrottler(t mockConstructorTestingTNewThrottler) *Throttler { +}) *Throttler { mock := &Throttler{} mock.Mock.Test(t)