1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9 "time"
10
11 "bnema.dev/ermite/internal/domain"
12 "bnema.dev/ermite/internal/ports"
13 mock "github.com/stretchr/testify/mock"
14)
15
16// NewCIStore creates a new instance of CIStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
17// The first argument is typically a *testing.T value.
18func NewCIStore(t interface {
19 mock.TestingT
20 Cleanup(func())
21}) *CIStore {
22 if helper, ok := t.(interface{ Helper() }); ok {
23 helper.Helper()
24 }
25
26 mock := &CIStore{}
27 mock.Mock.Test(t)
28
29 t.Cleanup(func() {
30 if helper, ok := t.(interface{ Helper() }); ok {
31 helper.Helper()
32 }
33 mock.AssertExpectations(t)
34 })
35
36 return mock
37}
38
39// CIStore is an autogenerated mock type for the CIStore type
40type CIStore struct {
41 mock.Mock
42}
43
44type CIStore_Expecter struct {
45 mock *mock.Mock
46}
47
48func (_m *CIStore) EXPECT() *CIStore_Expecter {
49 return &CIStore_Expecter{mock: &_m.Mock}
50}
51
52// Apply provides a mock function for the type CIStore
53func (_mock *CIStore) Apply(ctx context.Context, w ports.CIWrite) (uint64, error) {
54 ret := _mock.Called(ctx, w)
55
56 if len(ret) == 0 {
57 panic("no return value specified for Apply")
58 }
59
60 var r0 uint64
61 var r1 error
62 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIWrite) (uint64, error)); ok {
63 return returnFunc(ctx, w)
64 }
65 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.CIWrite) uint64); ok {
66 r0 = returnFunc(ctx, w)
67 } else {
68 r0 = ret.Get(0).(uint64)
69 }
70 if returnFunc, ok := ret.Get(1).(func(context.Context, ports.CIWrite) error); ok {
71 r1 = returnFunc(ctx, w)
72 } else {
73 r1 = ret.Error(1)
74 }
75 return r0, r1
76}
77
78// CIStore_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'
79type CIStore_Apply_Call struct {
80 *mock.Call
81}
82
83// Apply is a helper method to define mock.On call
84// - ctx context.Context
85// - w ports.CIWrite
86func (_e *CIStore_Expecter) Apply(ctx any, w any) *CIStore_Apply_Call {
87 return &CIStore_Apply_Call{Call: _e.mock.On("Apply", ctx, w)}
88}
89
90func (_c *CIStore_Apply_Call) Run(run func(ctx context.Context, w ports.CIWrite)) *CIStore_Apply_Call {
91 _c.Call.Run(func(args mock.Arguments) {
92 var arg0 context.Context
93 if args[0] != nil {
94 arg0 = args[0].(context.Context)
95 }
96 var arg1 ports.CIWrite
97 if args[1] != nil {
98 arg1 = args[1].(ports.CIWrite)
99 }
100 run(
101 arg0,
102 arg1,
103 )
104 })
105 return _c
106}
107
108func (_c *CIStore_Apply_Call) Return(version uint64, err error) *CIStore_Apply_Call {
109 _c.Call.Return(version, err)
110 return _c
111}
112
113func (_c *CIStore_Apply_Call) RunAndReturn(run func(ctx context.Context, w ports.CIWrite) (uint64, error)) *CIStore_Apply_Call {
114 _c.Call.Return(run)
115 return _c
116}
117
118// CreateRun provides a mock function for the type CIStore
119func (_mock *CIStore) CreateRun(ctx context.Context, repo domain.RepoName, workflowPath string, build func(id int64, number int64) ports.CIRunDraft) (ports.CIRunDraft, error) {
120 ret := _mock.Called(ctx, repo, workflowPath, build)
121
122 if len(ret) == 0 {
123 panic("no return value specified for CreateRun")
124 }
125
126 var r0 ports.CIRunDraft
127 var r1 error
128 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, func(id int64, number int64) ports.CIRunDraft) (ports.CIRunDraft, error)); ok {
129 return returnFunc(ctx, repo, workflowPath, build)
130 }
131 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, func(id int64, number int64) ports.CIRunDraft) ports.CIRunDraft); ok {
132 r0 = returnFunc(ctx, repo, workflowPath, build)
133 } else {
134 r0 = ret.Get(0).(ports.CIRunDraft)
135 }
136 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string, func(id int64, number int64) ports.CIRunDraft) error); ok {
137 r1 = returnFunc(ctx, repo, workflowPath, build)
138 } else {
139 r1 = ret.Error(1)
140 }
141 return r0, r1
142}
143
144// CIStore_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun'
145type CIStore_CreateRun_Call struct {
146 *mock.Call
147}
148
149// CreateRun is a helper method to define mock.On call
150// - ctx context.Context
151// - repo domain.RepoName
152// - workflowPath string
153// - build func(id int64, number int64) ports.CIRunDraft
154func (_e *CIStore_Expecter) CreateRun(ctx any, repo any, workflowPath any, build any) *CIStore_CreateRun_Call {
155 return &CIStore_CreateRun_Call{Call: _e.mock.On("CreateRun", ctx, repo, workflowPath, build)}
156}
157
158func (_c *CIStore_CreateRun_Call) Run(run func(ctx context.Context, repo domain.RepoName, workflowPath string, build func(id int64, number int64) ports.CIRunDraft)) *CIStore_CreateRun_Call {
159 _c.Call.Run(func(args mock.Arguments) {
160 var arg0 context.Context
161 if args[0] != nil {
162 arg0 = args[0].(context.Context)
163 }
164 var arg1 domain.RepoName
165 if args[1] != nil {
166 arg1 = args[1].(domain.RepoName)
167 }
168 var arg2 string
169 if args[2] != nil {
170 arg2 = args[2].(string)
171 }
172 var arg3 func(id int64, number int64) ports.CIRunDraft
173 if args[3] != nil {
174 arg3 = args[3].(func(id int64, number int64) ports.CIRunDraft)
175 }
176 run(
177 arg0,
178 arg1,
179 arg2,
180 arg3,
181 )
182 })
183 return _c
184}
185
186func (_c *CIStore_CreateRun_Call) Return(cIRunDraft ports.CIRunDraft, err error) *CIStore_CreateRun_Call {
187 _c.Call.Return(cIRunDraft, err)
188 return _c
189}
190
191func (_c *CIStore_CreateRun_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, workflowPath string, build func(id int64, number int64) ports.CIRunDraft) (ports.CIRunDraft, error)) *CIStore_CreateRun_Call {
192 _c.Call.Return(run)
193 return _c
194}
195
196// CreateRunner provides a mock function for the type CIStore
197func (_mock *CIStore) CreateRunner(ctx context.Context, r domain.CIRunner, replace bool) ([]domain.CIRunner, error) {
198 ret := _mock.Called(ctx, r, replace)
199
200 if len(ret) == 0 {
201 panic("no return value specified for CreateRunner")
202 }
203
204 var r0 []domain.CIRunner
205 var r1 error
206 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.CIRunner, bool) ([]domain.CIRunner, error)); ok {
207 return returnFunc(ctx, r, replace)
208 }
209 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.CIRunner, bool) []domain.CIRunner); ok {
210 r0 = returnFunc(ctx, r, replace)
211 } else {
212 if ret.Get(0) != nil {
213 r0 = ret.Get(0).([]domain.CIRunner)
214 }
215 }
216 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.CIRunner, bool) error); ok {
217 r1 = returnFunc(ctx, r, replace)
218 } else {
219 r1 = ret.Error(1)
220 }
221 return r0, r1
222}
223
224// CIStore_CreateRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRunner'
225type CIStore_CreateRunner_Call struct {
226 *mock.Call
227}
228
229// CreateRunner is a helper method to define mock.On call
230// - ctx context.Context
231// - r domain.CIRunner
232// - replace bool
233func (_e *CIStore_Expecter) CreateRunner(ctx any, r any, replace any) *CIStore_CreateRunner_Call {
234 return &CIStore_CreateRunner_Call{Call: _e.mock.On("CreateRunner", ctx, r, replace)}
235}
236
237func (_c *CIStore_CreateRunner_Call) Run(run func(ctx context.Context, r domain.CIRunner, replace bool)) *CIStore_CreateRunner_Call {
238 _c.Call.Run(func(args mock.Arguments) {
239 var arg0 context.Context
240 if args[0] != nil {
241 arg0 = args[0].(context.Context)
242 }
243 var arg1 domain.CIRunner
244 if args[1] != nil {
245 arg1 = args[1].(domain.CIRunner)
246 }
247 var arg2 bool
248 if args[2] != nil {
249 arg2 = args[2].(bool)
250 }
251 run(
252 arg0,
253 arg1,
254 arg2,
255 )
256 })
257 return _c
258}
259
260func (_c *CIStore_CreateRunner_Call) Return(removed []domain.CIRunner, err error) *CIStore_CreateRunner_Call {
261 _c.Call.Return(removed, err)
262 return _c
263}
264
265func (_c *CIStore_CreateRunner_Call) RunAndReturn(run func(ctx context.Context, r domain.CIRunner, replace bool) ([]domain.CIRunner, error)) *CIStore_CreateRunner_Call {
266 _c.Call.Return(run)
267 return _c
268}
269
270// FindJobByToken provides a mock function for the type CIStore
271func (_mock *CIStore) FindJobByToken(ctx context.Context, hash domain.TokenHash, now time.Time) (domain.CIJob, error) {
272 ret := _mock.Called(ctx, hash, now)
273
274 if len(ret) == 0 {
275 panic("no return value specified for FindJobByToken")
276 }
277
278 var r0 domain.CIJob
279 var r1 error
280 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.TokenHash, time.Time) (domain.CIJob, error)); ok {
281 return returnFunc(ctx, hash, now)
282 }
283 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.TokenHash, time.Time) domain.CIJob); ok {
284 r0 = returnFunc(ctx, hash, now)
285 } else {
286 r0 = ret.Get(0).(domain.CIJob)
287 }
288 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.TokenHash, time.Time) error); ok {
289 r1 = returnFunc(ctx, hash, now)
290 } else {
291 r1 = ret.Error(1)
292 }
293 return r0, r1
294}
295
296// CIStore_FindJobByToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobByToken'
297type CIStore_FindJobByToken_Call struct {
298 *mock.Call
299}
300
301// FindJobByToken is a helper method to define mock.On call
302// - ctx context.Context
303// - hash domain.TokenHash
304// - now time.Time
305func (_e *CIStore_Expecter) FindJobByToken(ctx any, hash any, now any) *CIStore_FindJobByToken_Call {
306 return &CIStore_FindJobByToken_Call{Call: _e.mock.On("FindJobByToken", ctx, hash, now)}
307}
308
309func (_c *CIStore_FindJobByToken_Call) Run(run func(ctx context.Context, hash domain.TokenHash, now time.Time)) *CIStore_FindJobByToken_Call {
310 _c.Call.Run(func(args mock.Arguments) {
311 var arg0 context.Context
312 if args[0] != nil {
313 arg0 = args[0].(context.Context)
314 }
315 var arg1 domain.TokenHash
316 if args[1] != nil {
317 arg1 = args[1].(domain.TokenHash)
318 }
319 var arg2 time.Time
320 if args[2] != nil {
321 arg2 = args[2].(time.Time)
322 }
323 run(
324 arg0,
325 arg1,
326 arg2,
327 )
328 })
329 return _c
330}
331
332func (_c *CIStore_FindJobByToken_Call) Return(cIJob domain.CIJob, err error) *CIStore_FindJobByToken_Call {
333 _c.Call.Return(cIJob, err)
334 return _c
335}
336
337func (_c *CIStore_FindJobByToken_Call) RunAndReturn(run func(ctx context.Context, hash domain.TokenHash, now time.Time) (domain.CIJob, error)) *CIStore_FindJobByToken_Call {
338 _c.Call.Return(run)
339 return _c
340}
341
342// FindRunnerByToken provides a mock function for the type CIStore
343func (_mock *CIStore) FindRunnerByToken(ctx context.Context, hash domain.TokenHash) (domain.CIRunner, error) {
344 ret := _mock.Called(ctx, hash)
345
346 if len(ret) == 0 {
347 panic("no return value specified for FindRunnerByToken")
348 }
349
350 var r0 domain.CIRunner
351 var r1 error
352 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.TokenHash) (domain.CIRunner, error)); ok {
353 return returnFunc(ctx, hash)
354 }
355 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.TokenHash) domain.CIRunner); ok {
356 r0 = returnFunc(ctx, hash)
357 } else {
358 r0 = ret.Get(0).(domain.CIRunner)
359 }
360 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.TokenHash) error); ok {
361 r1 = returnFunc(ctx, hash)
362 } else {
363 r1 = ret.Error(1)
364 }
365 return r0, r1
366}
367
368// CIStore_FindRunnerByToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRunnerByToken'
369type CIStore_FindRunnerByToken_Call struct {
370 *mock.Call
371}
372
373// FindRunnerByToken is a helper method to define mock.On call
374// - ctx context.Context
375// - hash domain.TokenHash
376func (_e *CIStore_Expecter) FindRunnerByToken(ctx any, hash any) *CIStore_FindRunnerByToken_Call {
377 return &CIStore_FindRunnerByToken_Call{Call: _e.mock.On("FindRunnerByToken", ctx, hash)}
378}
379
380func (_c *CIStore_FindRunnerByToken_Call) Run(run func(ctx context.Context, hash domain.TokenHash)) *CIStore_FindRunnerByToken_Call {
381 _c.Call.Run(func(args mock.Arguments) {
382 var arg0 context.Context
383 if args[0] != nil {
384 arg0 = args[0].(context.Context)
385 }
386 var arg1 domain.TokenHash
387 if args[1] != nil {
388 arg1 = args[1].(domain.TokenHash)
389 }
390 run(
391 arg0,
392 arg1,
393 )
394 })
395 return _c
396}
397
398func (_c *CIStore_FindRunnerByToken_Call) Return(cIRunner domain.CIRunner, err error) *CIStore_FindRunnerByToken_Call {
399 _c.Call.Return(cIRunner, err)
400 return _c
401}
402
403func (_c *CIStore_FindRunnerByToken_Call) RunAndReturn(run func(ctx context.Context, hash domain.TokenHash) (domain.CIRunner, error)) *CIStore_FindRunnerByToken_Call {
404 _c.Call.Return(run)
405 return _c
406}
407
408// GetJob provides a mock function for the type CIStore
409func (_mock *CIStore) GetJob(ctx context.Context, runID int64, runAttempt int32, jobID string) (domain.CIJob, error) {
410 ret := _mock.Called(ctx, runID, runAttempt, jobID)
411
412 if len(ret) == 0 {
413 panic("no return value specified for GetJob")
414 }
415
416 var r0 domain.CIJob
417 var r1 error
418 if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int32, string) (domain.CIJob, error)); ok {
419 return returnFunc(ctx, runID, runAttempt, jobID)
420 }
421 if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int32, string) domain.CIJob); ok {
422 r0 = returnFunc(ctx, runID, runAttempt, jobID)
423 } else {
424 r0 = ret.Get(0).(domain.CIJob)
425 }
426 if returnFunc, ok := ret.Get(1).(func(context.Context, int64, int32, string) error); ok {
427 r1 = returnFunc(ctx, runID, runAttempt, jobID)
428 } else {
429 r1 = ret.Error(1)
430 }
431 return r0, r1
432}
433
434// CIStore_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob'
435type CIStore_GetJob_Call struct {
436 *mock.Call
437}
438
439// GetJob is a helper method to define mock.On call
440// - ctx context.Context
441// - runID int64
442// - runAttempt int32
443// - jobID string
444func (_e *CIStore_Expecter) GetJob(ctx any, runID any, runAttempt any, jobID any) *CIStore_GetJob_Call {
445 return &CIStore_GetJob_Call{Call: _e.mock.On("GetJob", ctx, runID, runAttempt, jobID)}
446}
447
448func (_c *CIStore_GetJob_Call) Run(run func(ctx context.Context, runID int64, runAttempt int32, jobID string)) *CIStore_GetJob_Call {
449 _c.Call.Run(func(args mock.Arguments) {
450 var arg0 context.Context
451 if args[0] != nil {
452 arg0 = args[0].(context.Context)
453 }
454 var arg1 int64
455 if args[1] != nil {
456 arg1 = args[1].(int64)
457 }
458 var arg2 int32
459 if args[2] != nil {
460 arg2 = args[2].(int32)
461 }
462 var arg3 string
463 if args[3] != nil {
464 arg3 = args[3].(string)
465 }
466 run(
467 arg0,
468 arg1,
469 arg2,
470 arg3,
471 )
472 })
473 return _c
474}
475
476func (_c *CIStore_GetJob_Call) Return(cIJob domain.CIJob, err error) *CIStore_GetJob_Call {
477 _c.Call.Return(cIJob, err)
478 return _c
479}
480
481func (_c *CIStore_GetJob_Call) RunAndReturn(run func(ctx context.Context, runID int64, runAttempt int32, jobID string) (domain.CIJob, error)) *CIStore_GetJob_Call {
482 _c.Call.Return(run)
483 return _c
484}
485
486// GetRun provides a mock function for the type CIStore
487func (_mock *CIStore) GetRun(ctx context.Context, repo domain.RepoName, id int64) (domain.CIRun, error) {
488 ret := _mock.Called(ctx, repo, id)
489
490 if len(ret) == 0 {
491 panic("no return value specified for GetRun")
492 }
493
494 var r0 domain.CIRun
495 var r1 error
496 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64) (domain.CIRun, error)); ok {
497 return returnFunc(ctx, repo, id)
498 }
499 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64) domain.CIRun); ok {
500 r0 = returnFunc(ctx, repo, id)
501 } else {
502 r0 = ret.Get(0).(domain.CIRun)
503 }
504 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, int64) error); ok {
505 r1 = returnFunc(ctx, repo, id)
506 } else {
507 r1 = ret.Error(1)
508 }
509 return r0, r1
510}
511
512// CIStore_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun'
513type CIStore_GetRun_Call struct {
514 *mock.Call
515}
516
517// GetRun is a helper method to define mock.On call
518// - ctx context.Context
519// - repo domain.RepoName
520// - id int64
521func (_e *CIStore_Expecter) GetRun(ctx any, repo any, id any) *CIStore_GetRun_Call {
522 return &CIStore_GetRun_Call{Call: _e.mock.On("GetRun", ctx, repo, id)}
523}
524
525func (_c *CIStore_GetRun_Call) Run(run func(ctx context.Context, repo domain.RepoName, id int64)) *CIStore_GetRun_Call {
526 _c.Call.Run(func(args mock.Arguments) {
527 var arg0 context.Context
528 if args[0] != nil {
529 arg0 = args[0].(context.Context)
530 }
531 var arg1 domain.RepoName
532 if args[1] != nil {
533 arg1 = args[1].(domain.RepoName)
534 }
535 var arg2 int64
536 if args[2] != nil {
537 arg2 = args[2].(int64)
538 }
539 run(
540 arg0,
541 arg1,
542 arg2,
543 )
544 })
545 return _c
546}
547
548func (_c *CIStore_GetRun_Call) Return(cIRun domain.CIRun, err error) *CIStore_GetRun_Call {
549 _c.Call.Return(cIRun, err)
550 return _c
551}
552
553func (_c *CIStore_GetRun_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, id int64) (domain.CIRun, error)) *CIStore_GetRun_Call {
554 _c.Call.Return(run)
555 return _c
556}
557
558// GetRunSource provides a mock function for the type CIStore
559func (_mock *CIStore) GetRunSource(ctx context.Context, runID int64) (domain.CIRunSource, error) {
560 ret := _mock.Called(ctx, runID)
561
562 if len(ret) == 0 {
563 panic("no return value specified for GetRunSource")
564 }
565
566 var r0 domain.CIRunSource
567 var r1 error
568 if returnFunc, ok := ret.Get(0).(func(context.Context, int64) (domain.CIRunSource, error)); ok {
569 return returnFunc(ctx, runID)
570 }
571 if returnFunc, ok := ret.Get(0).(func(context.Context, int64) domain.CIRunSource); ok {
572 r0 = returnFunc(ctx, runID)
573 } else {
574 r0 = ret.Get(0).(domain.CIRunSource)
575 }
576 if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok {
577 r1 = returnFunc(ctx, runID)
578 } else {
579 r1 = ret.Error(1)
580 }
581 return r0, r1
582}
583
584// CIStore_GetRunSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunSource'
585type CIStore_GetRunSource_Call struct {
586 *mock.Call
587}
588
589// GetRunSource is a helper method to define mock.On call
590// - ctx context.Context
591// - runID int64
592func (_e *CIStore_Expecter) GetRunSource(ctx any, runID any) *CIStore_GetRunSource_Call {
593 return &CIStore_GetRunSource_Call{Call: _e.mock.On("GetRunSource", ctx, runID)}
594}
595
596func (_c *CIStore_GetRunSource_Call) Run(run func(ctx context.Context, runID int64)) *CIStore_GetRunSource_Call {
597 _c.Call.Run(func(args mock.Arguments) {
598 var arg0 context.Context
599 if args[0] != nil {
600 arg0 = args[0].(context.Context)
601 }
602 var arg1 int64
603 if args[1] != nil {
604 arg1 = args[1].(int64)
605 }
606 run(
607 arg0,
608 arg1,
609 )
610 })
611 return _c
612}
613
614func (_c *CIStore_GetRunSource_Call) Return(cIRunSource domain.CIRunSource, err error) *CIStore_GetRunSource_Call {
615 _c.Call.Return(cIRunSource, err)
616 return _c
617}
618
619func (_c *CIStore_GetRunSource_Call) RunAndReturn(run func(ctx context.Context, runID int64) (domain.CIRunSource, error)) *CIStore_GetRunSource_Call {
620 _c.Call.Return(run)
621 return _c
622}
623
624// GetRunner provides a mock function for the type CIStore
625func (_mock *CIStore) GetRunner(ctx context.Context, id string) (domain.CIRunner, error) {
626 ret := _mock.Called(ctx, id)
627
628 if len(ret) == 0 {
629 panic("no return value specified for GetRunner")
630 }
631
632 var r0 domain.CIRunner
633 var r1 error
634 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.CIRunner, error)); ok {
635 return returnFunc(ctx, id)
636 }
637 if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.CIRunner); ok {
638 r0 = returnFunc(ctx, id)
639 } else {
640 r0 = ret.Get(0).(domain.CIRunner)
641 }
642 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
643 r1 = returnFunc(ctx, id)
644 } else {
645 r1 = ret.Error(1)
646 }
647 return r0, r1
648}
649
650// CIStore_GetRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunner'
651type CIStore_GetRunner_Call struct {
652 *mock.Call
653}
654
655// GetRunner is a helper method to define mock.On call
656// - ctx context.Context
657// - id string
658func (_e *CIStore_Expecter) GetRunner(ctx any, id any) *CIStore_GetRunner_Call {
659 return &CIStore_GetRunner_Call{Call: _e.mock.On("GetRunner", ctx, id)}
660}
661
662func (_c *CIStore_GetRunner_Call) Run(run func(ctx context.Context, id string)) *CIStore_GetRunner_Call {
663 _c.Call.Run(func(args mock.Arguments) {
664 var arg0 context.Context
665 if args[0] != nil {
666 arg0 = args[0].(context.Context)
667 }
668 var arg1 string
669 if args[1] != nil {
670 arg1 = args[1].(string)
671 }
672 run(
673 arg0,
674 arg1,
675 )
676 })
677 return _c
678}
679
680func (_c *CIStore_GetRunner_Call) Return(cIRunner domain.CIRunner, err error) *CIStore_GetRunner_Call {
681 _c.Call.Return(cIRunner, err)
682 return _c
683}
684
685func (_c *CIStore_GetRunner_Call) RunAndReturn(run func(ctx context.Context, id string) (domain.CIRunner, error)) *CIStore_GetRunner_Call {
686 _c.Call.Return(run)
687 return _c
688}
689
690// ListActiveJobs provides a mock function for the type CIStore
691func (_mock *CIStore) ListActiveJobs(ctx context.Context) ([]domain.CIJob, error) {
692 ret := _mock.Called(ctx)
693
694 if len(ret) == 0 {
695 panic("no return value specified for ListActiveJobs")
696 }
697
698 var r0 []domain.CIJob
699 var r1 error
700 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CIJob, error)); ok {
701 return returnFunc(ctx)
702 }
703 if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CIJob); ok {
704 r0 = returnFunc(ctx)
705 } else {
706 if ret.Get(0) != nil {
707 r0 = ret.Get(0).([]domain.CIJob)
708 }
709 }
710 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
711 r1 = returnFunc(ctx)
712 } else {
713 r1 = ret.Error(1)
714 }
715 return r0, r1
716}
717
718// CIStore_ListActiveJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListActiveJobs'
719type CIStore_ListActiveJobs_Call struct {
720 *mock.Call
721}
722
723// ListActiveJobs is a helper method to define mock.On call
724// - ctx context.Context
725func (_e *CIStore_Expecter) ListActiveJobs(ctx any) *CIStore_ListActiveJobs_Call {
726 return &CIStore_ListActiveJobs_Call{Call: _e.mock.On("ListActiveJobs", ctx)}
727}
728
729func (_c *CIStore_ListActiveJobs_Call) Run(run func(ctx context.Context)) *CIStore_ListActiveJobs_Call {
730 _c.Call.Run(func(args mock.Arguments) {
731 var arg0 context.Context
732 if args[0] != nil {
733 arg0 = args[0].(context.Context)
734 }
735 run(
736 arg0,
737 )
738 })
739 return _c
740}
741
742func (_c *CIStore_ListActiveJobs_Call) Return(cIJobs []domain.CIJob, err error) *CIStore_ListActiveJobs_Call {
743 _c.Call.Return(cIJobs, err)
744 return _c
745}
746
747func (_c *CIStore_ListActiveJobs_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CIJob, error)) *CIStore_ListActiveJobs_Call {
748 _c.Call.Return(run)
749 return _c
750}
751
752// ListChecks provides a mock function for the type CIStore
753func (_mock *CIStore) ListChecks(ctx context.Context, repo domain.RepoName, sha string, limit int) ([]domain.CICheck, bool, error) {
754 ret := _mock.Called(ctx, repo, sha, limit)
755
756 if len(ret) == 0 {
757 panic("no return value specified for ListChecks")
758 }
759
760 var r0 []domain.CICheck
761 var r1 bool
762 var r2 error
763 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, int) ([]domain.CICheck, bool, error)); ok {
764 return returnFunc(ctx, repo, sha, limit)
765 }
766 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, int) []domain.CICheck); ok {
767 r0 = returnFunc(ctx, repo, sha, limit)
768 } else {
769 if ret.Get(0) != nil {
770 r0 = ret.Get(0).([]domain.CICheck)
771 }
772 }
773 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string, int) bool); ok {
774 r1 = returnFunc(ctx, repo, sha, limit)
775 } else {
776 r1 = ret.Get(1).(bool)
777 }
778 if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, string, int) error); ok {
779 r2 = returnFunc(ctx, repo, sha, limit)
780 } else {
781 r2 = ret.Error(2)
782 }
783 return r0, r1, r2
784}
785
786// CIStore_ListChecks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChecks'
787type CIStore_ListChecks_Call struct {
788 *mock.Call
789}
790
791// ListChecks is a helper method to define mock.On call
792// - ctx context.Context
793// - repo domain.RepoName
794// - sha string
795// - limit int
796func (_e *CIStore_Expecter) ListChecks(ctx any, repo any, sha any, limit any) *CIStore_ListChecks_Call {
797 return &CIStore_ListChecks_Call{Call: _e.mock.On("ListChecks", ctx, repo, sha, limit)}
798}
799
800func (_c *CIStore_ListChecks_Call) Run(run func(ctx context.Context, repo domain.RepoName, sha string, limit int)) *CIStore_ListChecks_Call {
801 _c.Call.Run(func(args mock.Arguments) {
802 var arg0 context.Context
803 if args[0] != nil {
804 arg0 = args[0].(context.Context)
805 }
806 var arg1 domain.RepoName
807 if args[1] != nil {
808 arg1 = args[1].(domain.RepoName)
809 }
810 var arg2 string
811 if args[2] != nil {
812 arg2 = args[2].(string)
813 }
814 var arg3 int
815 if args[3] != nil {
816 arg3 = args[3].(int)
817 }
818 run(
819 arg0,
820 arg1,
821 arg2,
822 arg3,
823 )
824 })
825 return _c
826}
827
828func (_c *CIStore_ListChecks_Call) Return(checks []domain.CICheck, more bool, err error) *CIStore_ListChecks_Call {
829 _c.Call.Return(checks, more, err)
830 return _c
831}
832
833func (_c *CIStore_ListChecks_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, sha string, limit int) ([]domain.CICheck, bool, error)) *CIStore_ListChecks_Call {
834 _c.Call.Return(run)
835 return _c
836}
837
838// ListJobs provides a mock function for the type CIStore
839func (_mock *CIStore) ListJobs(ctx context.Context, runID int64, runAttempt int32) ([]domain.CIJob, error) {
840 ret := _mock.Called(ctx, runID, runAttempt)
841
842 if len(ret) == 0 {
843 panic("no return value specified for ListJobs")
844 }
845
846 var r0 []domain.CIJob
847 var r1 error
848 if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int32) ([]domain.CIJob, error)); ok {
849 return returnFunc(ctx, runID, runAttempt)
850 }
851 if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int32) []domain.CIJob); ok {
852 r0 = returnFunc(ctx, runID, runAttempt)
853 } else {
854 if ret.Get(0) != nil {
855 r0 = ret.Get(0).([]domain.CIJob)
856 }
857 }
858 if returnFunc, ok := ret.Get(1).(func(context.Context, int64, int32) error); ok {
859 r1 = returnFunc(ctx, runID, runAttempt)
860 } else {
861 r1 = ret.Error(1)
862 }
863 return r0, r1
864}
865
866// CIStore_ListJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListJobs'
867type CIStore_ListJobs_Call struct {
868 *mock.Call
869}
870
871// ListJobs is a helper method to define mock.On call
872// - ctx context.Context
873// - runID int64
874// - runAttempt int32
875func (_e *CIStore_Expecter) ListJobs(ctx any, runID any, runAttempt any) *CIStore_ListJobs_Call {
876 return &CIStore_ListJobs_Call{Call: _e.mock.On("ListJobs", ctx, runID, runAttempt)}
877}
878
879func (_c *CIStore_ListJobs_Call) Run(run func(ctx context.Context, runID int64, runAttempt int32)) *CIStore_ListJobs_Call {
880 _c.Call.Run(func(args mock.Arguments) {
881 var arg0 context.Context
882 if args[0] != nil {
883 arg0 = args[0].(context.Context)
884 }
885 var arg1 int64
886 if args[1] != nil {
887 arg1 = args[1].(int64)
888 }
889 var arg2 int32
890 if args[2] != nil {
891 arg2 = args[2].(int32)
892 }
893 run(
894 arg0,
895 arg1,
896 arg2,
897 )
898 })
899 return _c
900}
901
902func (_c *CIStore_ListJobs_Call) Return(cIJobs []domain.CIJob, err error) *CIStore_ListJobs_Call {
903 _c.Call.Return(cIJobs, err)
904 return _c
905}
906
907func (_c *CIStore_ListJobs_Call) RunAndReturn(run func(ctx context.Context, runID int64, runAttempt int32) ([]domain.CIJob, error)) *CIStore_ListJobs_Call {
908 _c.Call.Return(run)
909 return _c
910}
911
912// ListOpenRuns provides a mock function for the type CIStore
913func (_mock *CIStore) ListOpenRuns(ctx context.Context) ([]domain.CIRun, error) {
914 ret := _mock.Called(ctx)
915
916 if len(ret) == 0 {
917 panic("no return value specified for ListOpenRuns")
918 }
919
920 var r0 []domain.CIRun
921 var r1 error
922 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CIRun, error)); ok {
923 return returnFunc(ctx)
924 }
925 if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CIRun); ok {
926 r0 = returnFunc(ctx)
927 } else {
928 if ret.Get(0) != nil {
929 r0 = ret.Get(0).([]domain.CIRun)
930 }
931 }
932 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
933 r1 = returnFunc(ctx)
934 } else {
935 r1 = ret.Error(1)
936 }
937 return r0, r1
938}
939
940// CIStore_ListOpenRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListOpenRuns'
941type CIStore_ListOpenRuns_Call struct {
942 *mock.Call
943}
944
945// ListOpenRuns is a helper method to define mock.On call
946// - ctx context.Context
947func (_e *CIStore_Expecter) ListOpenRuns(ctx any) *CIStore_ListOpenRuns_Call {
948 return &CIStore_ListOpenRuns_Call{Call: _e.mock.On("ListOpenRuns", ctx)}
949}
950
951func (_c *CIStore_ListOpenRuns_Call) Run(run func(ctx context.Context)) *CIStore_ListOpenRuns_Call {
952 _c.Call.Run(func(args mock.Arguments) {
953 var arg0 context.Context
954 if args[0] != nil {
955 arg0 = args[0].(context.Context)
956 }
957 run(
958 arg0,
959 )
960 })
961 return _c
962}
963
964func (_c *CIStore_ListOpenRuns_Call) Return(cIRuns []domain.CIRun, err error) *CIStore_ListOpenRuns_Call {
965 _c.Call.Return(cIRuns, err)
966 return _c
967}
968
969func (_c *CIStore_ListOpenRuns_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CIRun, error)) *CIStore_ListOpenRuns_Call {
970 _c.Call.Return(run)
971 return _c
972}
973
974// ListReadyJobs provides a mock function for the type CIStore
975func (_mock *CIStore) ListReadyJobs(ctx context.Context, limit int) ([]domain.CIJob, error) {
976 ret := _mock.Called(ctx, limit)
977
978 if len(ret) == 0 {
979 panic("no return value specified for ListReadyJobs")
980 }
981
982 var r0 []domain.CIJob
983 var r1 error
984 if returnFunc, ok := ret.Get(0).(func(context.Context, int) ([]domain.CIJob, error)); ok {
985 return returnFunc(ctx, limit)
986 }
987 if returnFunc, ok := ret.Get(0).(func(context.Context, int) []domain.CIJob); ok {
988 r0 = returnFunc(ctx, limit)
989 } else {
990 if ret.Get(0) != nil {
991 r0 = ret.Get(0).([]domain.CIJob)
992 }
993 }
994 if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok {
995 r1 = returnFunc(ctx, limit)
996 } else {
997 r1 = ret.Error(1)
998 }
999 return r0, r1
1000}
1001
1002// CIStore_ListReadyJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReadyJobs'
1003type CIStore_ListReadyJobs_Call struct {
1004 *mock.Call
1005}
1006
1007// ListReadyJobs is a helper method to define mock.On call
1008// - ctx context.Context
1009// - limit int
1010func (_e *CIStore_Expecter) ListReadyJobs(ctx any, limit any) *CIStore_ListReadyJobs_Call {
1011 return &CIStore_ListReadyJobs_Call{Call: _e.mock.On("ListReadyJobs", ctx, limit)}
1012}
1013
1014func (_c *CIStore_ListReadyJobs_Call) Run(run func(ctx context.Context, limit int)) *CIStore_ListReadyJobs_Call {
1015 _c.Call.Run(func(args mock.Arguments) {
1016 var arg0 context.Context
1017 if args[0] != nil {
1018 arg0 = args[0].(context.Context)
1019 }
1020 var arg1 int
1021 if args[1] != nil {
1022 arg1 = args[1].(int)
1023 }
1024 run(
1025 arg0,
1026 arg1,
1027 )
1028 })
1029 return _c
1030}
1031
1032func (_c *CIStore_ListReadyJobs_Call) Return(cIJobs []domain.CIJob, err error) *CIStore_ListReadyJobs_Call {
1033 _c.Call.Return(cIJobs, err)
1034 return _c
1035}
1036
1037func (_c *CIStore_ListReadyJobs_Call) RunAndReturn(run func(ctx context.Context, limit int) ([]domain.CIJob, error)) *CIStore_ListReadyJobs_Call {
1038 _c.Call.Return(run)
1039 return _c
1040}
1041
1042// ListRunners provides a mock function for the type CIStore
1043func (_mock *CIStore) ListRunners(ctx context.Context) ([]domain.CIRunner, error) {
1044 ret := _mock.Called(ctx)
1045
1046 if len(ret) == 0 {
1047 panic("no return value specified for ListRunners")
1048 }
1049
1050 var r0 []domain.CIRunner
1051 var r1 error
1052 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.CIRunner, error)); ok {
1053 return returnFunc(ctx)
1054 }
1055 if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.CIRunner); ok {
1056 r0 = returnFunc(ctx)
1057 } else {
1058 if ret.Get(0) != nil {
1059 r0 = ret.Get(0).([]domain.CIRunner)
1060 }
1061 }
1062 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
1063 r1 = returnFunc(ctx)
1064 } else {
1065 r1 = ret.Error(1)
1066 }
1067 return r0, r1
1068}
1069
1070// CIStore_ListRunners_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunners'
1071type CIStore_ListRunners_Call struct {
1072 *mock.Call
1073}
1074
1075// ListRunners is a helper method to define mock.On call
1076// - ctx context.Context
1077func (_e *CIStore_Expecter) ListRunners(ctx any) *CIStore_ListRunners_Call {
1078 return &CIStore_ListRunners_Call{Call: _e.mock.On("ListRunners", ctx)}
1079}
1080
1081func (_c *CIStore_ListRunners_Call) Run(run func(ctx context.Context)) *CIStore_ListRunners_Call {
1082 _c.Call.Run(func(args mock.Arguments) {
1083 var arg0 context.Context
1084 if args[0] != nil {
1085 arg0 = args[0].(context.Context)
1086 }
1087 run(
1088 arg0,
1089 )
1090 })
1091 return _c
1092}
1093
1094func (_c *CIStore_ListRunners_Call) Return(cIRunners []domain.CIRunner, err error) *CIStore_ListRunners_Call {
1095 _c.Call.Return(cIRunners, err)
1096 return _c
1097}
1098
1099func (_c *CIStore_ListRunners_Call) RunAndReturn(run func(ctx context.Context) ([]domain.CIRunner, error)) *CIStore_ListRunners_Call {
1100 _c.Call.Return(run)
1101 return _c
1102}
1103
1104// ListRuns provides a mock function for the type CIStore
1105func (_mock *CIStore) ListRuns(ctx context.Context, repo domain.RepoName, before int64, limit int) ([]domain.CIRun, error) {
1106 ret := _mock.Called(ctx, repo, before, limit)
1107
1108 if len(ret) == 0 {
1109 panic("no return value specified for ListRuns")
1110 }
1111
1112 var r0 []domain.CIRun
1113 var r1 error
1114 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64, int) ([]domain.CIRun, error)); ok {
1115 return returnFunc(ctx, repo, before, limit)
1116 }
1117 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, int64, int) []domain.CIRun); ok {
1118 r0 = returnFunc(ctx, repo, before, limit)
1119 } else {
1120 if ret.Get(0) != nil {
1121 r0 = ret.Get(0).([]domain.CIRun)
1122 }
1123 }
1124 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, int64, int) error); ok {
1125 r1 = returnFunc(ctx, repo, before, limit)
1126 } else {
1127 r1 = ret.Error(1)
1128 }
1129 return r0, r1
1130}
1131
1132// CIStore_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns'
1133type CIStore_ListRuns_Call struct {
1134 *mock.Call
1135}
1136
1137// ListRuns is a helper method to define mock.On call
1138// - ctx context.Context
1139// - repo domain.RepoName
1140// - before int64
1141// - limit int
1142func (_e *CIStore_Expecter) ListRuns(ctx any, repo any, before any, limit any) *CIStore_ListRuns_Call {
1143 return &CIStore_ListRuns_Call{Call: _e.mock.On("ListRuns", ctx, repo, before, limit)}
1144}
1145
1146func (_c *CIStore_ListRuns_Call) Run(run func(ctx context.Context, repo domain.RepoName, before int64, limit int)) *CIStore_ListRuns_Call {
1147 _c.Call.Run(func(args mock.Arguments) {
1148 var arg0 context.Context
1149 if args[0] != nil {
1150 arg0 = args[0].(context.Context)
1151 }
1152 var arg1 domain.RepoName
1153 if args[1] != nil {
1154 arg1 = args[1].(domain.RepoName)
1155 }
1156 var arg2 int64
1157 if args[2] != nil {
1158 arg2 = args[2].(int64)
1159 }
1160 var arg3 int
1161 if args[3] != nil {
1162 arg3 = args[3].(int)
1163 }
1164 run(
1165 arg0,
1166 arg1,
1167 arg2,
1168 arg3,
1169 )
1170 })
1171 return _c
1172}
1173
1174func (_c *CIStore_ListRuns_Call) Return(cIRuns []domain.CIRun, err error) *CIStore_ListRuns_Call {
1175 _c.Call.Return(cIRuns, err)
1176 return _c
1177}
1178
1179func (_c *CIStore_ListRuns_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, before int64, limit int) ([]domain.CIRun, error)) *CIStore_ListRuns_Call {
1180 _c.Call.Return(run)
1181 return _c
1182}
1183
1184// RemoveRunner provides a mock function for the type CIStore
1185func (_mock *CIStore) RemoveRunner(ctx context.Context, id string) (domain.CIRunner, error) {
1186 ret := _mock.Called(ctx, id)
1187
1188 if len(ret) == 0 {
1189 panic("no return value specified for RemoveRunner")
1190 }
1191
1192 var r0 domain.CIRunner
1193 var r1 error
1194 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.CIRunner, error)); ok {
1195 return returnFunc(ctx, id)
1196 }
1197 if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.CIRunner); ok {
1198 r0 = returnFunc(ctx, id)
1199 } else {
1200 r0 = ret.Get(0).(domain.CIRunner)
1201 }
1202 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
1203 r1 = returnFunc(ctx, id)
1204 } else {
1205 r1 = ret.Error(1)
1206 }
1207 return r0, r1
1208}
1209
1210// CIStore_RemoveRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRunner'
1211type CIStore_RemoveRunner_Call struct {
1212 *mock.Call
1213}
1214
1215// RemoveRunner is a helper method to define mock.On call
1216// - ctx context.Context
1217// - id string
1218func (_e *CIStore_Expecter) RemoveRunner(ctx any, id any) *CIStore_RemoveRunner_Call {
1219 return &CIStore_RemoveRunner_Call{Call: _e.mock.On("RemoveRunner", ctx, id)}
1220}
1221
1222func (_c *CIStore_RemoveRunner_Call) Run(run func(ctx context.Context, id string)) *CIStore_RemoveRunner_Call {
1223 _c.Call.Run(func(args mock.Arguments) {
1224 var arg0 context.Context
1225 if args[0] != nil {
1226 arg0 = args[0].(context.Context)
1227 }
1228 var arg1 string
1229 if args[1] != nil {
1230 arg1 = args[1].(string)
1231 }
1232 run(
1233 arg0,
1234 arg1,
1235 )
1236 })
1237 return _c
1238}
1239
1240func (_c *CIStore_RemoveRunner_Call) Return(cIRunner domain.CIRunner, err error) *CIStore_RemoveRunner_Call {
1241 _c.Call.Return(cIRunner, err)
1242 return _c
1243}
1244
1245func (_c *CIStore_RemoveRunner_Call) RunAndReturn(run func(ctx context.Context, id string) (domain.CIRunner, error)) *CIStore_RemoveRunner_Call {
1246 _c.Call.Return(run)
1247 return _c
1248}
1249
1250// RunIDs provides a mock function for the type CIStore
1251func (_mock *CIStore) RunIDs(ctx context.Context, repo domain.RepoName) ([]int64, error) {
1252 ret := _mock.Called(ctx, repo)
1253
1254 if len(ret) == 0 {
1255 panic("no return value specified for RunIDs")
1256 }
1257
1258 var r0 []int64
1259 var r1 error
1260 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) ([]int64, error)); ok {
1261 return returnFunc(ctx, repo)
1262 }
1263 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) []int64); ok {
1264 r0 = returnFunc(ctx, repo)
1265 } else {
1266 if ret.Get(0) != nil {
1267 r0 = ret.Get(0).([]int64)
1268 }
1269 }
1270 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok {
1271 r1 = returnFunc(ctx, repo)
1272 } else {
1273 r1 = ret.Error(1)
1274 }
1275 return r0, r1
1276}
1277
1278// CIStore_RunIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunIDs'
1279type CIStore_RunIDs_Call struct {
1280 *mock.Call
1281}
1282
1283// RunIDs is a helper method to define mock.On call
1284// - ctx context.Context
1285// - repo domain.RepoName
1286func (_e *CIStore_Expecter) RunIDs(ctx any, repo any) *CIStore_RunIDs_Call {
1287 return &CIStore_RunIDs_Call{Call: _e.mock.On("RunIDs", ctx, repo)}
1288}
1289
1290func (_c *CIStore_RunIDs_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *CIStore_RunIDs_Call {
1291 _c.Call.Run(func(args mock.Arguments) {
1292 var arg0 context.Context
1293 if args[0] != nil {
1294 arg0 = args[0].(context.Context)
1295 }
1296 var arg1 domain.RepoName
1297 if args[1] != nil {
1298 arg1 = args[1].(domain.RepoName)
1299 }
1300 run(
1301 arg0,
1302 arg1,
1303 )
1304 })
1305 return _c
1306}
1307
1308func (_c *CIStore_RunIDs_Call) Return(int64s []int64, err error) *CIStore_RunIDs_Call {
1309 _c.Call.Return(int64s, err)
1310 return _c
1311}
1312
1313func (_c *CIStore_RunIDs_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) ([]int64, error)) *CIStore_RunIDs_Call {
1314 _c.Call.Return(run)
1315 return _c
1316}
1317
1318// Sweep provides a mock function for the type CIStore
1319func (_mock *CIStore) Sweep(ctx context.Context, before time.Time) ([]int64, error) {
1320 ret := _mock.Called(ctx, before)
1321
1322 if len(ret) == 0 {
1323 panic("no return value specified for Sweep")
1324 }
1325
1326 var r0 []int64
1327 var r1 error
1328 if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) ([]int64, error)); ok {
1329 return returnFunc(ctx, before)
1330 }
1331 if returnFunc, ok := ret.Get(0).(func(context.Context, time.Time) []int64); ok {
1332 r0 = returnFunc(ctx, before)
1333 } else {
1334 if ret.Get(0) != nil {
1335 r0 = ret.Get(0).([]int64)
1336 }
1337 }
1338 if returnFunc, ok := ret.Get(1).(func(context.Context, time.Time) error); ok {
1339 r1 = returnFunc(ctx, before)
1340 } else {
1341 r1 = ret.Error(1)
1342 }
1343 return r0, r1
1344}
1345
1346// CIStore_Sweep_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sweep'
1347type CIStore_Sweep_Call struct {
1348 *mock.Call
1349}
1350
1351// Sweep is a helper method to define mock.On call
1352// - ctx context.Context
1353// - before time.Time
1354func (_e *CIStore_Expecter) Sweep(ctx any, before any) *CIStore_Sweep_Call {
1355 return &CIStore_Sweep_Call{Call: _e.mock.On("Sweep", ctx, before)}
1356}
1357
1358func (_c *CIStore_Sweep_Call) Run(run func(ctx context.Context, before time.Time)) *CIStore_Sweep_Call {
1359 _c.Call.Run(func(args mock.Arguments) {
1360 var arg0 context.Context
1361 if args[0] != nil {
1362 arg0 = args[0].(context.Context)
1363 }
1364 var arg1 time.Time
1365 if args[1] != nil {
1366 arg1 = args[1].(time.Time)
1367 }
1368 run(
1369 arg0,
1370 arg1,
1371 )
1372 })
1373 return _c
1374}
1375
1376func (_c *CIStore_Sweep_Call) Return(int64s []int64, err error) *CIStore_Sweep_Call {
1377 _c.Call.Return(int64s, err)
1378 return _c
1379}
1380
1381func (_c *CIStore_Sweep_Call) RunAndReturn(run func(ctx context.Context, before time.Time) ([]int64, error)) *CIStore_Sweep_Call {
1382 _c.Call.Return(run)
1383 return _c
1384}