1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "bnema.dev/ermite/internal/domain"
11 "bnema.dev/ermite/internal/ports"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// 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.
16// The first argument is typically a *testing.T value.
17func NewRunService(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *RunService {
21 if helper, ok := t.(interface{ Helper() }); ok {
22 helper.Helper()
23 }
24
25 mock := &RunService{}
26 mock.Mock.Test(t)
27
28 t.Cleanup(func() {
29 if helper, ok := t.(interface{ Helper() }); ok {
30 helper.Helper()
31 }
32 mock.AssertExpectations(t)
33 })
34
35 return mock
36}
37
38// RunService is an autogenerated mock type for the RunService type
39type RunService struct {
40 mock.Mock
41}
42
43type RunService_Expecter struct {
44 mock *mock.Mock
45}
46
47func (_m *RunService) EXPECT() *RunService_Expecter {
48 return &RunService_Expecter{mock: &_m.Mock}
49}
50
51// CancelRun provides a mock function for the type RunService
52func (_mock *RunService) CancelRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error) {
53 ret := _mock.Called(ctx, p, repo, runID)
54
55 if len(ret) == 0 {
56 panic("no return value specified for CancelRun")
57 }
58
59 var r0 domain.CIRun
60 var r1 error
61 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) (domain.CIRun, error)); ok {
62 return returnFunc(ctx, p, repo, runID)
63 }
64 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64) domain.CIRun); ok {
65 r0 = returnFunc(ctx, p, repo, runID)
66 } else {
67 r0 = ret.Get(0).(domain.CIRun)
68 }
69 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64) error); ok {
70 r1 = returnFunc(ctx, p, repo, runID)
71 } else {
72 r1 = ret.Error(1)
73 }
74 return r0, r1
75}
76
77// RunService_CancelRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRun'
78type RunService_CancelRun_Call struct {
79 *mock.Call
80}
81
82// CancelRun is a helper method to define mock.On call
83// - ctx context.Context
84// - p domain.Principal
85// - repo domain.RepoName
86// - runID int64
87func (_e *RunService_Expecter) CancelRun(ctx any, p any, repo any, runID any) *RunService_CancelRun_Call {
88 return &RunService_CancelRun_Call{Call: _e.mock.On("CancelRun", ctx, p, repo, runID)}
89}
90
91func (_c *RunService_CancelRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64)) *RunService_CancelRun_Call {
92 _c.Call.Run(func(args mock.Arguments) {
93 var arg0 context.Context
94 if args[0] != nil {
95 arg0 = args[0].(context.Context)
96 }
97 var arg1 domain.Principal
98 if args[1] != nil {
99 arg1 = args[1].(domain.Principal)
100 }
101 var arg2 domain.RepoName
102 if args[2] != nil {
103 arg2 = args[2].(domain.RepoName)
104 }
105 var arg3 int64
106 if args[3] != nil {
107 arg3 = args[3].(int64)
108 }
109 run(
110 arg0,
111 arg1,
112 arg2,
113 arg3,
114 )
115 })
116 return _c
117}
118
119func (_c *RunService_CancelRun_Call) Return(cIRun domain.CIRun, err error) *RunService_CancelRun_Call {
120 _c.Call.Return(cIRun, err)
121 return _c
122}
123
124func (_c *RunService_CancelRun_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64) (domain.CIRun, error)) *RunService_CancelRun_Call {
125 _c.Call.Return(run)
126 return _c
127}
128
129// DispatchWorkflow provides a mock function for the type RunService
130func (_mock *RunService) DispatchWorkflow(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.DispatchParams) (domain.CIRun, error) {
131 ret := _mock.Called(ctx, p, repo, params)
132
133 if len(ret) == 0 {
134 panic("no return value specified for DispatchWorkflow")
135 }
136
137 var r0 domain.CIRun
138 var r1 error
139 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.DispatchParams) (domain.CIRun, error)); ok {
140 return returnFunc(ctx, p, repo, params)
141 }
142 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.DispatchParams) domain.CIRun); ok {
143 r0 = returnFunc(ctx, p, repo, params)
144 } else {
145 r0 = ret.Get(0).(domain.CIRun)
146 }
147 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.DispatchParams) error); ok {
148 r1 = returnFunc(ctx, p, repo, params)
149 } else {
150 r1 = ret.Error(1)
151 }
152 return r0, r1
153}
154
155// RunService_DispatchWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DispatchWorkflow'
156type RunService_DispatchWorkflow_Call struct {
157 *mock.Call
158}
159
160// DispatchWorkflow is a helper method to define mock.On call
161// - ctx context.Context
162// - p domain.Principal
163// - repo domain.RepoName
164// - params ports.DispatchParams
165func (_e *RunService_Expecter) DispatchWorkflow(ctx any, p any, repo any, params any) *RunService_DispatchWorkflow_Call {
166 return &RunService_DispatchWorkflow_Call{Call: _e.mock.On("DispatchWorkflow", ctx, p, repo, params)}
167}
168
169func (_c *RunService_DispatchWorkflow_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.DispatchParams)) *RunService_DispatchWorkflow_Call {
170 _c.Call.Run(func(args mock.Arguments) {
171 var arg0 context.Context
172 if args[0] != nil {
173 arg0 = args[0].(context.Context)
174 }
175 var arg1 domain.Principal
176 if args[1] != nil {
177 arg1 = args[1].(domain.Principal)
178 }
179 var arg2 domain.RepoName
180 if args[2] != nil {
181 arg2 = args[2].(domain.RepoName)
182 }
183 var arg3 ports.DispatchParams
184 if args[3] != nil {
185 arg3 = args[3].(ports.DispatchParams)
186 }
187 run(
188 arg0,
189 arg1,
190 arg2,
191 arg3,
192 )
193 })
194 return _c
195}
196
197func (_c *RunService_DispatchWorkflow_Call) Return(cIRun domain.CIRun, err error) *RunService_DispatchWorkflow_Call {
198 _c.Call.Return(cIRun, err)
199 return _c
200}
201
202func (_c *RunService_DispatchWorkflow_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.DispatchParams) (domain.CIRun, error)) *RunService_DispatchWorkflow_Call {
203 _c.Call.Return(run)
204 return _c
205}
206
207// GetJob provides a mock function for the type RunService
208func (_mock *RunService) GetJob(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32) (ports.JobView, error) {
209 ret := _mock.Called(ctx, p, repo, jobID, attempt)
210
211 if len(ret) == 0 {
212 panic("no return value specified for GetJob")
213 }
214
215 var r0 ports.JobView
216 var r1 error
217 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) (ports.JobView, error)); ok {
218 return returnFunc(ctx, p, repo, jobID, attempt)
219 }
220 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32) ports.JobView); ok {
221 r0 = returnFunc(ctx, p, repo, jobID, attempt)
222 } else {
223 r0 = ret.Get(0).(ports.JobView)
224 }
225 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32) error); ok {
226 r1 = returnFunc(ctx, p, repo, jobID, attempt)
227 } else {
228 r1 = ret.Error(1)
229 }
230 return r0, r1
231}
232
233// RunService_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob'
234type RunService_GetJob_Call struct {
235 *mock.Call
236}
237
238// GetJob is a helper method to define mock.On call
239// - ctx context.Context
240// - p domain.Principal
241// - repo domain.RepoName
242// - jobID string
243// - attempt int32
244func (_e *RunService_Expecter) GetJob(ctx any, p any, repo any, jobID any, attempt any) *RunService_GetJob_Call {
245 return &RunService_GetJob_Call{Call: _e.mock.On("GetJob", ctx, p, repo, jobID, attempt)}
246}
247
248func (_c *RunService_GetJob_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32)) *RunService_GetJob_Call {
249 _c.Call.Run(func(args mock.Arguments) {
250 var arg0 context.Context
251 if args[0] != nil {
252 arg0 = args[0].(context.Context)
253 }
254 var arg1 domain.Principal
255 if args[1] != nil {
256 arg1 = args[1].(domain.Principal)
257 }
258 var arg2 domain.RepoName
259 if args[2] != nil {
260 arg2 = args[2].(domain.RepoName)
261 }
262 var arg3 string
263 if args[3] != nil {
264 arg3 = args[3].(string)
265 }
266 var arg4 int32
267 if args[4] != nil {
268 arg4 = args[4].(int32)
269 }
270 run(
271 arg0,
272 arg1,
273 arg2,
274 arg3,
275 arg4,
276 )
277 })
278 return _c
279}
280
281func (_c *RunService_GetJob_Call) Return(jobView ports.JobView, err error) *RunService_GetJob_Call {
282 _c.Call.Return(jobView, err)
283 return _c
284}
285
286func (_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 {
287 _c.Call.Return(run)
288 return _c
289}
290
291// GetJobLog provides a mock function for the type RunService
292func (_mock *RunService) GetJobLog(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.GetJobLogParams, send func(ports.LogBatch) error) error {
293 ret := _mock.Called(ctx, p, repo, params, send)
294
295 if len(ret) == 0 {
296 panic("no return value specified for GetJobLog")
297 }
298
299 var r0 error
300 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.GetJobLogParams, func(ports.LogBatch) error) error); ok {
301 r0 = returnFunc(ctx, p, repo, params, send)
302 } else {
303 r0 = ret.Error(0)
304 }
305 return r0
306}
307
308// RunService_GetJobLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobLog'
309type RunService_GetJobLog_Call struct {
310 *mock.Call
311}
312
313// GetJobLog is a helper method to define mock.On call
314// - ctx context.Context
315// - p domain.Principal
316// - repo domain.RepoName
317// - params ports.GetJobLogParams
318// - send func(ports.LogBatch) error
319func (_e *RunService_Expecter) GetJobLog(ctx any, p any, repo any, params any, send any) *RunService_GetJobLog_Call {
320 return &RunService_GetJobLog_Call{Call: _e.mock.On("GetJobLog", ctx, p, repo, params, send)}
321}
322
323func (_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 {
324 _c.Call.Run(func(args mock.Arguments) {
325 var arg0 context.Context
326 if args[0] != nil {
327 arg0 = args[0].(context.Context)
328 }
329 var arg1 domain.Principal
330 if args[1] != nil {
331 arg1 = args[1].(domain.Principal)
332 }
333 var arg2 domain.RepoName
334 if args[2] != nil {
335 arg2 = args[2].(domain.RepoName)
336 }
337 var arg3 ports.GetJobLogParams
338 if args[3] != nil {
339 arg3 = args[3].(ports.GetJobLogParams)
340 }
341 var arg4 func(ports.LogBatch) error
342 if args[4] != nil {
343 arg4 = args[4].(func(ports.LogBatch) error)
344 }
345 run(
346 arg0,
347 arg1,
348 arg2,
349 arg3,
350 arg4,
351 )
352 })
353 return _c
354}
355
356func (_c *RunService_GetJobLog_Call) Return(err error) *RunService_GetJobLog_Call {
357 _c.Call.Return(err)
358 return _c
359}
360
361func (_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 {
362 _c.Call.Return(run)
363 return _c
364}
365
366// GetRun provides a mock function for the type RunService
367func (_mock *RunService) GetRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32) (ports.RunDetail, error) {
368 ret := _mock.Called(ctx, p, repo, runID, attempt)
369
370 if len(ret) == 0 {
371 panic("no return value specified for GetRun")
372 }
373
374 var r0 ports.RunDetail
375 var r1 error
376 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) (ports.RunDetail, error)); ok {
377 return returnFunc(ctx, p, repo, runID, attempt)
378 }
379 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) ports.RunDetail); ok {
380 r0 = returnFunc(ctx, p, repo, runID, attempt)
381 } else {
382 r0 = ret.Get(0).(ports.RunDetail)
383 }
384 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32) error); ok {
385 r1 = returnFunc(ctx, p, repo, runID, attempt)
386 } else {
387 r1 = ret.Error(1)
388 }
389 return r0, r1
390}
391
392// RunService_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun'
393type RunService_GetRun_Call struct {
394 *mock.Call
395}
396
397// GetRun is a helper method to define mock.On call
398// - ctx context.Context
399// - p domain.Principal
400// - repo domain.RepoName
401// - runID int64
402// - attempt int32
403func (_e *RunService_Expecter) GetRun(ctx any, p any, repo any, runID any, attempt any) *RunService_GetRun_Call {
404 return &RunService_GetRun_Call{Call: _e.mock.On("GetRun", ctx, p, repo, runID, attempt)}
405}
406
407func (_c *RunService_GetRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32)) *RunService_GetRun_Call {
408 _c.Call.Run(func(args mock.Arguments) {
409 var arg0 context.Context
410 if args[0] != nil {
411 arg0 = args[0].(context.Context)
412 }
413 var arg1 domain.Principal
414 if args[1] != nil {
415 arg1 = args[1].(domain.Principal)
416 }
417 var arg2 domain.RepoName
418 if args[2] != nil {
419 arg2 = args[2].(domain.RepoName)
420 }
421 var arg3 int64
422 if args[3] != nil {
423 arg3 = args[3].(int64)
424 }
425 var arg4 int32
426 if args[4] != nil {
427 arg4 = args[4].(int32)
428 }
429 run(
430 arg0,
431 arg1,
432 arg2,
433 arg3,
434 arg4,
435 )
436 })
437 return _c
438}
439
440func (_c *RunService_GetRun_Call) Return(runDetail ports.RunDetail, err error) *RunService_GetRun_Call {
441 _c.Call.Return(runDetail, err)
442 return _c
443}
444
445func (_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 {
446 _c.Call.Return(run)
447 return _c
448}
449
450// GetStepSummaries provides a mock function for the type RunService
451func (_mock *RunService) GetStepSummaries(ctx context.Context, p domain.Principal, repo domain.RepoName, jobID string, attempt int32, maxBytes int64) (ports.SummaryList, error) {
452 ret := _mock.Called(ctx, p, repo, jobID, attempt, maxBytes)
453
454 if len(ret) == 0 {
455 panic("no return value specified for GetStepSummaries")
456 }
457
458 var r0 ports.SummaryList
459 var r1 error
460 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) (ports.SummaryList, error)); ok {
461 return returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
462 }
463 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) ports.SummaryList); ok {
464 r0 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
465 } else {
466 r0 = ret.Get(0).(ports.SummaryList)
467 }
468 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string, int32, int64) error); ok {
469 r1 = returnFunc(ctx, p, repo, jobID, attempt, maxBytes)
470 } else {
471 r1 = ret.Error(1)
472 }
473 return r0, r1
474}
475
476// RunService_GetStepSummaries_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStepSummaries'
477type RunService_GetStepSummaries_Call struct {
478 *mock.Call
479}
480
481// GetStepSummaries is a helper method to define mock.On call
482// - ctx context.Context
483// - p domain.Principal
484// - repo domain.RepoName
485// - jobID string
486// - attempt int32
487// - maxBytes int64
488func (_e *RunService_Expecter) GetStepSummaries(ctx any, p any, repo any, jobID any, attempt any, maxBytes any) *RunService_GetStepSummaries_Call {
489 return &RunService_GetStepSummaries_Call{Call: _e.mock.On("GetStepSummaries", ctx, p, repo, jobID, attempt, maxBytes)}
490}
491
492func (_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 {
493 _c.Call.Run(func(args mock.Arguments) {
494 var arg0 context.Context
495 if args[0] != nil {
496 arg0 = args[0].(context.Context)
497 }
498 var arg1 domain.Principal
499 if args[1] != nil {
500 arg1 = args[1].(domain.Principal)
501 }
502 var arg2 domain.RepoName
503 if args[2] != nil {
504 arg2 = args[2].(domain.RepoName)
505 }
506 var arg3 string
507 if args[3] != nil {
508 arg3 = args[3].(string)
509 }
510 var arg4 int32
511 if args[4] != nil {
512 arg4 = args[4].(int32)
513 }
514 var arg5 int64
515 if args[5] != nil {
516 arg5 = args[5].(int64)
517 }
518 run(
519 arg0,
520 arg1,
521 arg2,
522 arg3,
523 arg4,
524 arg5,
525 )
526 })
527 return _c
528}
529
530func (_c *RunService_GetStepSummaries_Call) Return(summaryList ports.SummaryList, err error) *RunService_GetStepSummaries_Call {
531 _c.Call.Return(summaryList, err)
532 return _c
533}
534
535func (_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 {
536 _c.Call.Return(run)
537 return _c
538}
539
540// ListAnnotations provides a mock function for the type RunService
541func (_mock *RunService) ListAnnotations(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, attempt int32, jobID string) (ports.AnnotationList, error) {
542 ret := _mock.Called(ctx, p, repo, runID, attempt, jobID)
543
544 if len(ret) == 0 {
545 panic("no return value specified for ListAnnotations")
546 }
547
548 var r0 ports.AnnotationList
549 var r1 error
550 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) (ports.AnnotationList, error)); ok {
551 return returnFunc(ctx, p, repo, runID, attempt, jobID)
552 }
553 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) ports.AnnotationList); ok {
554 r0 = returnFunc(ctx, p, repo, runID, attempt, jobID)
555 } else {
556 r0 = ret.Get(0).(ports.AnnotationList)
557 }
558 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, int32, string) error); ok {
559 r1 = returnFunc(ctx, p, repo, runID, attempt, jobID)
560 } else {
561 r1 = ret.Error(1)
562 }
563 return r0, r1
564}
565
566// RunService_ListAnnotations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAnnotations'
567type RunService_ListAnnotations_Call struct {
568 *mock.Call
569}
570
571// ListAnnotations is a helper method to define mock.On call
572// - ctx context.Context
573// - p domain.Principal
574// - repo domain.RepoName
575// - runID int64
576// - attempt int32
577// - jobID string
578func (_e *RunService_Expecter) ListAnnotations(ctx any, p any, repo any, runID any, attempt any, jobID any) *RunService_ListAnnotations_Call {
579 return &RunService_ListAnnotations_Call{Call: _e.mock.On("ListAnnotations", ctx, p, repo, runID, attempt, jobID)}
580}
581
582func (_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 {
583 _c.Call.Run(func(args mock.Arguments) {
584 var arg0 context.Context
585 if args[0] != nil {
586 arg0 = args[0].(context.Context)
587 }
588 var arg1 domain.Principal
589 if args[1] != nil {
590 arg1 = args[1].(domain.Principal)
591 }
592 var arg2 domain.RepoName
593 if args[2] != nil {
594 arg2 = args[2].(domain.RepoName)
595 }
596 var arg3 int64
597 if args[3] != nil {
598 arg3 = args[3].(int64)
599 }
600 var arg4 int32
601 if args[4] != nil {
602 arg4 = args[4].(int32)
603 }
604 var arg5 string
605 if args[5] != nil {
606 arg5 = args[5].(string)
607 }
608 run(
609 arg0,
610 arg1,
611 arg2,
612 arg3,
613 arg4,
614 arg5,
615 )
616 })
617 return _c
618}
619
620func (_c *RunService_ListAnnotations_Call) Return(annotationList ports.AnnotationList, err error) *RunService_ListAnnotations_Call {
621 _c.Call.Return(annotationList, err)
622 return _c
623}
624
625func (_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 {
626 _c.Call.Return(run)
627 return _c
628}
629
630// ListChecks provides a mock function for the type RunService
631func (_mock *RunService) ListChecks(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error) {
632 ret := _mock.Called(ctx, p, repo, sha)
633
634 if len(ret) == 0 {
635 panic("no return value specified for ListChecks")
636 }
637
638 var r0 ports.ChecksResult
639 var r1 error
640 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) (ports.ChecksResult, error)); ok {
641 return returnFunc(ctx, p, repo, sha)
642 }
643 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, string) ports.ChecksResult); ok {
644 r0 = returnFunc(ctx, p, repo, sha)
645 } else {
646 r0 = ret.Get(0).(ports.ChecksResult)
647 }
648 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, string) error); ok {
649 r1 = returnFunc(ctx, p, repo, sha)
650 } else {
651 r1 = ret.Error(1)
652 }
653 return r0, r1
654}
655
656// RunService_ListChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChecks'
657type RunService_ListChecks_Call struct {
658 *mock.Call
659}
660
661// ListChecks is a helper method to define mock.On call
662// - ctx context.Context
663// - p domain.Principal
664// - repo domain.RepoName
665// - sha string
666func (_e *RunService_Expecter) ListChecks(ctx any, p any, repo any, sha any) *RunService_ListChecks_Call {
667 return &RunService_ListChecks_Call{Call: _e.mock.On("ListChecks", ctx, p, repo, sha)}
668}
669
670func (_c *RunService_ListChecks_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string)) *RunService_ListChecks_Call {
671 _c.Call.Run(func(args mock.Arguments) {
672 var arg0 context.Context
673 if args[0] != nil {
674 arg0 = args[0].(context.Context)
675 }
676 var arg1 domain.Principal
677 if args[1] != nil {
678 arg1 = args[1].(domain.Principal)
679 }
680 var arg2 domain.RepoName
681 if args[2] != nil {
682 arg2 = args[2].(domain.RepoName)
683 }
684 var arg3 string
685 if args[3] != nil {
686 arg3 = args[3].(string)
687 }
688 run(
689 arg0,
690 arg1,
691 arg2,
692 arg3,
693 )
694 })
695 return _c
696}
697
698func (_c *RunService_ListChecks_Call) Return(checksResult ports.ChecksResult, err error) *RunService_ListChecks_Call {
699 _c.Call.Return(checksResult, err)
700 return _c
701}
702
703func (_c *RunService_ListChecks_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, sha string) (ports.ChecksResult, error)) *RunService_ListChecks_Call {
704 _c.Call.Return(run)
705 return _c
706}
707
708// ListRunners provides a mock function for the type RunService
709func (_mock *RunService) ListRunners(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error) {
710 ret := _mock.Called(ctx, p, size, token)
711
712 if len(ret) == 0 {
713 panic("no return value specified for ListRunners")
714 }
715
716 var r0 ports.RunnerPage
717 var r1 error
718 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) (ports.RunnerPage, error)); ok {
719 return returnFunc(ctx, p, size, token)
720 }
721 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, int, string) ports.RunnerPage); ok {
722 r0 = returnFunc(ctx, p, size, token)
723 } else {
724 r0 = ret.Get(0).(ports.RunnerPage)
725 }
726 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, int, string) error); ok {
727 r1 = returnFunc(ctx, p, size, token)
728 } else {
729 r1 = ret.Error(1)
730 }
731 return r0, r1
732}
733
734// RunService_ListRunners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunners'
735type RunService_ListRunners_Call struct {
736 *mock.Call
737}
738
739// ListRunners is a helper method to define mock.On call
740// - ctx context.Context
741// - p domain.Principal
742// - size int
743// - token string
744func (_e *RunService_Expecter) ListRunners(ctx any, p any, size any, token any) *RunService_ListRunners_Call {
745 return &RunService_ListRunners_Call{Call: _e.mock.On("ListRunners", ctx, p, size, token)}
746}
747
748func (_c *RunService_ListRunners_Call) Run(run func(ctx context.Context, p domain.Principal, size int, token string)) *RunService_ListRunners_Call {
749 _c.Call.Run(func(args mock.Arguments) {
750 var arg0 context.Context
751 if args[0] != nil {
752 arg0 = args[0].(context.Context)
753 }
754 var arg1 domain.Principal
755 if args[1] != nil {
756 arg1 = args[1].(domain.Principal)
757 }
758 var arg2 int
759 if args[2] != nil {
760 arg2 = args[2].(int)
761 }
762 var arg3 string
763 if args[3] != nil {
764 arg3 = args[3].(string)
765 }
766 run(
767 arg0,
768 arg1,
769 arg2,
770 arg3,
771 )
772 })
773 return _c
774}
775
776func (_c *RunService_ListRunners_Call) Return(runnerPage ports.RunnerPage, err error) *RunService_ListRunners_Call {
777 _c.Call.Return(runnerPage, err)
778 return _c
779}
780
781func (_c *RunService_ListRunners_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, size int, token string) (ports.RunnerPage, error)) *RunService_ListRunners_Call {
782 _c.Call.Return(run)
783 return _c
784}
785
786// ListRuns provides a mock function for the type RunService
787func (_mock *RunService) ListRuns(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams) (ports.RunPage, error) {
788 ret := _mock.Called(ctx, p, repo, params)
789
790 if len(ret) == 0 {
791 panic("no return value specified for ListRuns")
792 }
793
794 var r0 ports.RunPage
795 var r1 error
796 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) (ports.RunPage, error)); ok {
797 return returnFunc(ctx, p, repo, params)
798 }
799 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) ports.RunPage); ok {
800 r0 = returnFunc(ctx, p, repo, params)
801 } else {
802 r0 = ret.Get(0).(ports.RunPage)
803 }
804 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, ports.ListRunsParams) error); ok {
805 r1 = returnFunc(ctx, p, repo, params)
806 } else {
807 r1 = ret.Error(1)
808 }
809 return r0, r1
810}
811
812// RunService_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns'
813type RunService_ListRuns_Call struct {
814 *mock.Call
815}
816
817// ListRuns is a helper method to define mock.On call
818// - ctx context.Context
819// - p domain.Principal
820// - repo domain.RepoName
821// - params ports.ListRunsParams
822func (_e *RunService_Expecter) ListRuns(ctx any, p any, repo any, params any) *RunService_ListRuns_Call {
823 return &RunService_ListRuns_Call{Call: _e.mock.On("ListRuns", ctx, p, repo, params)}
824}
825
826func (_c *RunService_ListRuns_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, params ports.ListRunsParams)) *RunService_ListRuns_Call {
827 _c.Call.Run(func(args mock.Arguments) {
828 var arg0 context.Context
829 if args[0] != nil {
830 arg0 = args[0].(context.Context)
831 }
832 var arg1 domain.Principal
833 if args[1] != nil {
834 arg1 = args[1].(domain.Principal)
835 }
836 var arg2 domain.RepoName
837 if args[2] != nil {
838 arg2 = args[2].(domain.RepoName)
839 }
840 var arg3 ports.ListRunsParams
841 if args[3] != nil {
842 arg3 = args[3].(ports.ListRunsParams)
843 }
844 run(
845 arg0,
846 arg1,
847 arg2,
848 arg3,
849 )
850 })
851 return _c
852}
853
854func (_c *RunService_ListRuns_Call) Return(runPage ports.RunPage, err error) *RunService_ListRuns_Call {
855 _c.Call.Return(runPage, err)
856 return _c
857}
858
859func (_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 {
860 _c.Call.Return(run)
861 return _c
862}
863
864// RemoveRunner provides a mock function for the type RunService
865func (_mock *RunService) RemoveRunner(ctx context.Context, p domain.Principal, id string) error {
866 ret := _mock.Called(ctx, p, id)
867
868 if len(ret) == 0 {
869 panic("no return value specified for RemoveRunner")
870 }
871
872 var r0 error
873 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string) error); ok {
874 r0 = returnFunc(ctx, p, id)
875 } else {
876 r0 = ret.Error(0)
877 }
878 return r0
879}
880
881// RunService_RemoveRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRunner'
882type RunService_RemoveRunner_Call struct {
883 *mock.Call
884}
885
886// RemoveRunner is a helper method to define mock.On call
887// - ctx context.Context
888// - p domain.Principal
889// - id string
890func (_e *RunService_Expecter) RemoveRunner(ctx any, p any, id any) *RunService_RemoveRunner_Call {
891 return &RunService_RemoveRunner_Call{Call: _e.mock.On("RemoveRunner", ctx, p, id)}
892}
893
894func (_c *RunService_RemoveRunner_Call) Run(run func(ctx context.Context, p domain.Principal, id string)) *RunService_RemoveRunner_Call {
895 _c.Call.Run(func(args mock.Arguments) {
896 var arg0 context.Context
897 if args[0] != nil {
898 arg0 = args[0].(context.Context)
899 }
900 var arg1 domain.Principal
901 if args[1] != nil {
902 arg1 = args[1].(domain.Principal)
903 }
904 var arg2 string
905 if args[2] != nil {
906 arg2 = args[2].(string)
907 }
908 run(
909 arg0,
910 arg1,
911 arg2,
912 )
913 })
914 return _c
915}
916
917func (_c *RunService_RemoveRunner_Call) Return(err error) *RunService_RemoveRunner_Call {
918 _c.Call.Return(err)
919 return _c
920}
921
922func (_c *RunService_RemoveRunner_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, id string) error) *RunService_RemoveRunner_Call {
923 _c.Call.Return(run)
924 return _c
925}
926
927// RerunRun provides a mock function for the type RunService
928func (_mock *RunService) RerunRun(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool) (domain.CIRun, error) {
929 ret := _mock.Called(ctx, p, repo, runID, failedOnly)
930
931 if len(ret) == 0 {
932 panic("no return value specified for RerunRun")
933 }
934
935 var r0 domain.CIRun
936 var r1 error
937 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) (domain.CIRun, error)); ok {
938 return returnFunc(ctx, p, repo, runID, failedOnly)
939 }
940 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) domain.CIRun); ok {
941 r0 = returnFunc(ctx, p, repo, runID, failedOnly)
942 } else {
943 r0 = ret.Get(0).(domain.CIRun)
944 }
945 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, domain.RepoName, int64, bool) error); ok {
946 r1 = returnFunc(ctx, p, repo, runID, failedOnly)
947 } else {
948 r1 = ret.Error(1)
949 }
950 return r0, r1
951}
952
953// RunService_RerunRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RerunRun'
954type RunService_RerunRun_Call struct {
955 *mock.Call
956}
957
958// RerunRun is a helper method to define mock.On call
959// - ctx context.Context
960// - p domain.Principal
961// - repo domain.RepoName
962// - runID int64
963// - failedOnly bool
964func (_e *RunService_Expecter) RerunRun(ctx any, p any, repo any, runID any, failedOnly any) *RunService_RerunRun_Call {
965 return &RunService_RerunRun_Call{Call: _e.mock.On("RerunRun", ctx, p, repo, runID, failedOnly)}
966}
967
968func (_c *RunService_RerunRun_Call) Run(run func(ctx context.Context, p domain.Principal, repo domain.RepoName, runID int64, failedOnly bool)) *RunService_RerunRun_Call {
969 _c.Call.Run(func(args mock.Arguments) {
970 var arg0 context.Context
971 if args[0] != nil {
972 arg0 = args[0].(context.Context)
973 }
974 var arg1 domain.Principal
975 if args[1] != nil {
976 arg1 = args[1].(domain.Principal)
977 }
978 var arg2 domain.RepoName
979 if args[2] != nil {
980 arg2 = args[2].(domain.RepoName)
981 }
982 var arg3 int64
983 if args[3] != nil {
984 arg3 = args[3].(int64)
985 }
986 var arg4 bool
987 if args[4] != nil {
988 arg4 = args[4].(bool)
989 }
990 run(
991 arg0,
992 arg1,
993 arg2,
994 arg3,
995 arg4,
996 )
997 })
998 return _c
999}
1000
1001func (_c *RunService_RerunRun_Call) Return(cIRun domain.CIRun, err error) *RunService_RerunRun_Call {
1002 _c.Call.Return(cIRun, err)
1003 return _c
1004}
1005
1006func (_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 {
1007 _c.Call.Return(run)
1008 return _c
1009}