// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewRunService creates a new instance of RunService. 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 NewRunService(t interface { mock.TestingT Cleanup(func()) }) *RunService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &RunService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // RunService is an autogenerated mock type for the RunService type type RunService struct { mock.Mock } type RunService_Expecter struct { mock *mock.Mock } func (_m *RunService) EXPECT() *RunService_Expecter { return &RunService_Expecter{mock: &_m.Mock} } // CancelRun provides a mock function for the type RunService func (_mock *RunService) CancelRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error) { ret := _mock.Called(ctx, p, repo, runID) if len(ret) == 0 { panic("no return value specified for CancelRun") } var r0 domain.CIRun var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.CIRun, error)); ok { return returnFunc(ctx, p, repo, runID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.CIRun); ok { r0 = returnFunc(ctx, p, repo, runID) } else { r0 = ret.Get(0).(domain.CIRun) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok { r1 = returnFunc(ctx, p, repo, runID) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_CancelRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRun' type RunService_CancelRun_Call struct { *mock.Call } // CancelRun is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - runID int64 func (_e *RunService_Expecter) CancelRun(ctx any, p any, repo any, runID any) *RunService_CancelRun_Call { return &RunService_CancelRun_Call{Call: _e.mock.On("CancelRun", ctx, p, repo, runID)} } func (_c *RunService_CancelRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64)) *RunService_CancelRun_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *RunService_CancelRun_Call) Return(cIRun domain.CIRun, err error) *RunService_CancelRun_Call { _c.Call.Return(cIRun, err) return _c } func (_c *RunService_CancelRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error)) *RunService_CancelRun_Call { _c.Call.Return(run) return _c } // GetJob provides a mock function for the type RunService func (_mock *RunService) GetJob(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32) (ports.JobView, error) { ret := _mock.Called(ctx, p, repo, jobID, attempt) if len(ret) == 0 { panic("no return value specified for GetJob") } var r0 ports.JobView var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) (ports.JobView, error)); ok { return returnFunc(ctx, p, repo, jobID, attempt) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) ports.JobView); ok { r0 = returnFunc(ctx, p, repo, jobID, attempt) } else { r0 = ret.Get(0).(ports.JobView) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32) error); ok { r1 = returnFunc(ctx, p, repo, jobID, attempt) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob' type RunService_GetJob_Call struct { *mock.Call } // GetJob is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - jobID string // - attempt int32 func (_e *RunService_Expecter) GetJob(ctx any, p any, repo any, jobID any, attempt any) *RunService_GetJob_Call { return &RunService_GetJob_Call{Call: _e.mock.On("GetJob", ctx, p, repo, jobID, attempt)} } func (_c *RunService_GetJob_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32)) *RunService_GetJob_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int32 if args[4] != nil { arg4 = args[4].(int32) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *RunService_GetJob_Call) Return(jobView ports.JobView, err error) *RunService_GetJob_Call { _c.Call.Return(jobView, err) return _c } func (_c *RunService_GetJob_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32) (ports.JobView, error)) *RunService_GetJob_Call { _c.Call.Return(run) return _c } // GetJobLog provides a mock function for the type RunService func (_mock *RunService) GetJobLog(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error) error { ret := _mock.Called(ctx, p, repo, params, send) if len(ret) == 0 { panic("no return value specified for GetJobLog") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.GetJobLogParams, func(ports.LogBatch) error) error); ok { r0 = returnFunc(ctx, p, repo, params, send) } else { r0 = ret.Error(0) } return r0 } // RunService_GetJobLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobLog' type RunService_GetJobLog_Call struct { *mock.Call } // GetJobLog is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - params ports.GetJobLogParams // - send func(ports.LogBatch) error func (_e *RunService_Expecter) GetJobLog(ctx any, p any, repo any, params any, send any) *RunService_GetJobLog_Call { return &RunService_GetJobLog_Call{Call: _e.mock.On("GetJobLog", ctx, p, repo, params, send)} } func (_c *RunService_GetJobLog_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error)) *RunService_GetJobLog_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.GetJobLogParams if args[3] != nil { arg3 = args[3].(ports.GetJobLogParams) } var arg4 func(ports.LogBatch) error if args[4] != nil { arg4 = args[4].(func(ports.LogBatch) error) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *RunService_GetJobLog_Call) Return(err error) *RunService_GetJobLog_Call { _c.Call.Return(err) return _c } func (_c *RunService_GetJobLog_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error) error) *RunService_GetJobLog_Call { _c.Call.Return(run) return _c } // GetRun provides a mock function for the type RunService func (_mock *RunService) GetRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32) (ports.RunDetail, error) { ret := _mock.Called(ctx, p, repo, runID, attempt) if len(ret) == 0 { panic("no return value specified for GetRun") } var r0 ports.RunDetail var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) (ports.RunDetail, error)); ok { return returnFunc(ctx, p, repo, runID, attempt) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) ports.RunDetail); ok { r0 = returnFunc(ctx, p, repo, runID, attempt) } else { r0 = ret.Get(0).(ports.RunDetail) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) error); ok { r1 = returnFunc(ctx, p, repo, runID, attempt) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun' type RunService_GetRun_Call struct { *mock.Call } // GetRun is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - runID int64 // - attempt int32 func (_e *RunService_Expecter) GetRun(ctx any, p any, repo any, runID any, attempt any) *RunService_GetRun_Call { return &RunService_GetRun_Call{Call: _e.mock.On("GetRun", ctx, p, repo, runID, attempt)} } func (_c *RunService_GetRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32)) *RunService_GetRun_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 int32 if args[4] != nil { arg4 = args[4].(int32) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *RunService_GetRun_Call) Return(runDetail ports.RunDetail, err error) *RunService_GetRun_Call { _c.Call.Return(runDetail, err) return _c } func (_c *RunService_GetRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32) (ports.RunDetail, error)) *RunService_GetRun_Call { _c.Call.Return(run) return _c } // GetStepSummaries provides a mock function for the type RunService func (_mock *RunService) GetStepSummaries(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64) (ports.SummaryList, error) { ret := _mock.Called(ctx, p, repo, jobID, attempt, maxBytes) if len(ret) == 0 { panic("no return value specified for GetStepSummaries") } var r0 ports.SummaryList var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) (ports.SummaryList, error)); ok { return returnFunc(ctx, p, repo, jobID, attempt, maxBytes) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) ports.SummaryList); ok { r0 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes) } else { r0 = ret.Get(0).(ports.SummaryList) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) error); ok { r1 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_GetStepSummaries_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStepSummaries' type RunService_GetStepSummaries_Call struct { *mock.Call } // GetStepSummaries is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - jobID string // - attempt int32 // - maxBytes int64 func (_e *RunService_Expecter) GetStepSummaries(ctx any, p any, repo any, jobID any, attempt any, maxBytes any) *RunService_GetStepSummaries_Call { return &RunService_GetStepSummaries_Call{Call: _e.mock.On("GetStepSummaries", ctx, p, repo, jobID, attempt, maxBytes)} } func (_c *RunService_GetStepSummaries_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64)) *RunService_GetStepSummaries_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 int32 if args[4] != nil { arg4 = args[4].(int32) } var arg5 int64 if args[5] != nil { arg5 = args[5].(int64) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *RunService_GetStepSummaries_Call) Return(summaryList ports.SummaryList, err error) *RunService_GetStepSummaries_Call { _c.Call.Return(summaryList, err) return _c } func (_c *RunService_GetStepSummaries_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64) (ports.SummaryList, error)) *RunService_GetStepSummaries_Call { _c.Call.Return(run) return _c } // ListAnnotations provides a mock function for the type RunService func (_mock *RunService) ListAnnotations(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string) (ports.AnnotationList, error) { ret := _mock.Called(ctx, p, repo, runID, attempt, jobID) if len(ret) == 0 { panic("no return value specified for ListAnnotations") } var r0 ports.AnnotationList var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) (ports.AnnotationList, error)); ok { return returnFunc(ctx, p, repo, runID, attempt, jobID) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) ports.AnnotationList); ok { r0 = returnFunc(ctx, p, repo, runID, attempt, jobID) } else { r0 = ret.Get(0).(ports.AnnotationList) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) error); ok { r1 = returnFunc(ctx, p, repo, runID, attempt, jobID) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_ListAnnotations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAnnotations' type RunService_ListAnnotations_Call struct { *mock.Call } // ListAnnotations is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - runID int64 // - attempt int32 // - jobID string func (_e *RunService_Expecter) ListAnnotations(ctx any, p any, repo any, runID any, attempt any, jobID any) *RunService_ListAnnotations_Call { return &RunService_ListAnnotations_Call{Call: _e.mock.On("ListAnnotations", ctx, p, repo, runID, attempt, jobID)} } func (_c *RunService_ListAnnotations_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string)) *RunService_ListAnnotations_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 int32 if args[4] != nil { arg4 = args[4].(int32) } var arg5 string if args[5] != nil { arg5 = args[5].(string) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *RunService_ListAnnotations_Call) Return(annotationList ports.AnnotationList, err error) *RunService_ListAnnotations_Call { _c.Call.Return(annotationList, err) return _c } func (_c *RunService_ListAnnotations_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string) (ports.AnnotationList, error)) *RunService_ListAnnotations_Call { _c.Call.Return(run) return _c } // ListChecks provides a mock function for the type RunService func (_mock *RunService) ListChecks(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error) { ret := _mock.Called(ctx, p, repo, sha) if len(ret) == 0 { panic("no return value specified for ListChecks") } var r0 ports.ChecksResult var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) (ports.ChecksResult, error)); ok { return returnFunc(ctx, p, repo, sha) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) ports.ChecksResult); ok { r0 = returnFunc(ctx, p, repo, sha) } else { r0 = ret.Get(0).(ports.ChecksResult) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string) error); ok { r1 = returnFunc(ctx, p, repo, sha) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_ListChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChecks' type RunService_ListChecks_Call struct { *mock.Call } // ListChecks is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - sha string func (_e *RunService_Expecter) ListChecks(ctx any, p any, repo any, sha any) *RunService_ListChecks_Call { return &RunService_ListChecks_Call{Call: _e.mock.On("ListChecks", ctx, p, repo, sha)} } func (_c *RunService_ListChecks_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string)) *RunService_ListChecks_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *RunService_ListChecks_Call) Return(checksResult ports.ChecksResult, err error) *RunService_ListChecks_Call { _c.Call.Return(checksResult, err) return _c } func (_c *RunService_ListChecks_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error)) *RunService_ListChecks_Call { _c.Call.Return(run) return _c } // ListRunners provides a mock function for the type RunService func (_mock *RunService) ListRunners(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error) { ret := _mock.Called(ctx, p, size, token) if len(ret) == 0 { panic("no return value specified for ListRunners") } var r0 ports.RunnerPage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) (ports.RunnerPage, error)); ok { return returnFunc(ctx, p, size, token) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) ports.RunnerPage); ok { r0 = returnFunc(ctx, p, size, token) } else { r0 = ret.Get(0).(ports.RunnerPage) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, int, string) error); ok { r1 = returnFunc(ctx, p, size, token) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_ListRunners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunners' type RunService_ListRunners_Call struct { *mock.Call } // ListRunners is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - size int // - token string func (_e *RunService_Expecter) ListRunners(ctx any, p any, size any, token any) *RunService_ListRunners_Call { return &RunService_ListRunners_Call{Call: _e.mock.On("ListRunners", ctx, p, size, token)} } func (_c *RunService_ListRunners_Call) Run(run func(ctx context.Context, p domain.Principal, size int, token string)) *RunService_ListRunners_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *RunService_ListRunners_Call) Return(runnerPage ports.RunnerPage, err error) *RunService_ListRunners_Call { _c.Call.Return(runnerPage, err) return _c } func (_c *RunService_ListRunners_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error)) *RunService_ListRunners_Call { _c.Call.Return(run) return _c } // ListRuns provides a mock function for the type RunService func (_mock *RunService) ListRuns(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams) (ports.RunPage, error) { ret := _mock.Called(ctx, p, repo, params) if len(ret) == 0 { panic("no return value specified for ListRuns") } var r0 ports.RunPage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) (ports.RunPage, error)); ok { return returnFunc(ctx, p, repo, params) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) ports.RunPage); ok { r0 = returnFunc(ctx, p, repo, params) } else { r0 = ret.Get(0).(ports.RunPage) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) error); ok { r1 = returnFunc(ctx, p, repo, params) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' type RunService_ListRuns_Call struct { *mock.Call } // ListRuns is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - params ports.ListRunsParams func (_e *RunService_Expecter) ListRuns(ctx any, p any, repo any, params any) *RunService_ListRuns_Call { return &RunService_ListRuns_Call{Call: _e.mock.On("ListRuns", ctx, p, repo, params)} } func (_c *RunService_ListRuns_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams)) *RunService_ListRuns_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 ports.ListRunsParams if args[3] != nil { arg3 = args[3].(ports.ListRunsParams) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *RunService_ListRuns_Call) Return(runPage ports.RunPage, err error) *RunService_ListRuns_Call { _c.Call.Return(runPage, err) return _c } func (_c *RunService_ListRuns_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams) (ports.RunPage, error)) *RunService_ListRuns_Call { _c.Call.Return(run) return _c } // RemoveRunner provides a mock function for the type RunService func (_mock *RunService) RemoveRunner(ctx context.Context, p domain.Principal, id string) error { ret := _mock.Called(ctx, p, id) if len(ret) == 0 { panic("no return value specified for RemoveRunner") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string) error); ok { r0 = returnFunc(ctx, p, id) } else { r0 = ret.Error(0) } return r0 } // RunService_RemoveRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRunner' type RunService_RemoveRunner_Call struct { *mock.Call } // RemoveRunner is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - id string func (_e *RunService_Expecter) RemoveRunner(ctx any, p any, id any) *RunService_RemoveRunner_Call { return &RunService_RemoveRunner_Call{Call: _e.mock.On("RemoveRunner", ctx, p, id)} } func (_c *RunService_RemoveRunner_Call) Run(run func(ctx context.Context, p domain.Principal, id string)) *RunService_RemoveRunner_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *RunService_RemoveRunner_Call) Return(err error) *RunService_RemoveRunner_Call { _c.Call.Return(err) return _c } func (_c *RunService_RemoveRunner_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, id string) error) *RunService_RemoveRunner_Call { _c.Call.Return(run) return _c } // RerunRun provides a mock function for the type RunService func (_mock *RunService) RerunRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool) (domain.CIRun, error) { ret := _mock.Called(ctx, p, repo, runID, failedOnly) if len(ret) == 0 { panic("no return value specified for RerunRun") } var r0 domain.CIRun var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) (domain.CIRun, error)); ok { return returnFunc(ctx, p, repo, runID, failedOnly) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) domain.CIRun); ok { r0 = returnFunc(ctx, p, repo, runID, failedOnly) } else { r0 = ret.Get(0).(domain.CIRun) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) error); ok { r1 = returnFunc(ctx, p, repo, runID, failedOnly) } else { r1 = ret.Error(1) } return r0, r1 } // RunService_RerunRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RerunRun' type RunService_RerunRun_Call struct { *mock.Call } // RerunRun is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - repo domain.RepoName // - runID int64 // - failedOnly bool func (_e *RunService_Expecter) RerunRun(ctx any, p any, repo any, runID any, failedOnly any) *RunService_RerunRun_Call { return &RunService_RerunRun_Call{Call: _e.mock.On("RerunRun", ctx, p, repo, runID, failedOnly)} } func (_c *RunService_RerunRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool)) *RunService_RerunRun_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 domain.RepoName if args[2] != nil { arg2 = args[2].(domain.RepoName) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 bool if args[4] != nil { arg4 = args[4].(bool) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *RunService_RerunRun_Call) Return(cIRun domain.CIRun, err error) *RunService_RerunRun_Call { _c.Call.Return(cIRun, err) return _c } func (_c *RunService_RerunRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool) (domain.CIRun, error)) *RunService_RerunRun_Call { _c.Call.Return(run) return _c }