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 "github.com/bnema/dumber/internal/application/port"
11 "github.com/bnema/dumber/internal/domain/entity"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockUpdateChecker creates a new instance of MockUpdateChecker. 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 NewMockUpdateChecker(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MockUpdateChecker {
21 mock := &MockUpdateChecker{}
22 mock.Mock.Test(t)
23
24 t.Cleanup(func() { mock.AssertExpectations(t) })
25
26 return mock
27}
28
29// MockUpdateChecker is an autogenerated mock type for the UpdateChecker type
30type MockUpdateChecker struct {
31 mock.Mock
32}
33
34type MockUpdateChecker_Expecter struct {
35 mock *mock.Mock
36}
37
38func (_m *MockUpdateChecker) EXPECT() *MockUpdateChecker_Expecter {
39 return &MockUpdateChecker_Expecter{mock: &_m.Mock}
40}
41
42// CheckForUpdate provides a mock function for the type MockUpdateChecker
43func (_mock *MockUpdateChecker) CheckForUpdate(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error) {
44 ret := _mock.Called(ctx, currentVersion)
45
46 if len(ret) == 0 {
47 panic("no return value specified for CheckForUpdate")
48 }
49
50 var r0 *entity.UpdateInfo
51 var r1 error
52 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.UpdateInfo, error)); ok {
53 return returnFunc(ctx, currentVersion)
54 }
55 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.UpdateInfo); ok {
56 r0 = returnFunc(ctx, currentVersion)
57 } else {
58 if ret.Get(0) != nil {
59 r0 = ret.Get(0).(*entity.UpdateInfo)
60 }
61 }
62 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
63 r1 = returnFunc(ctx, currentVersion)
64 } else {
65 r1 = ret.Error(1)
66 }
67 return r0, r1
68}
69
70// MockUpdateChecker_CheckForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckForUpdate'
71type MockUpdateChecker_CheckForUpdate_Call struct {
72 *mock.Call
73}
74
75// CheckForUpdate is a helper method to define mock.On call
76// - ctx context.Context
77// - currentVersion string
78func (_e *MockUpdateChecker_Expecter) CheckForUpdate(ctx any, currentVersion any) *MockUpdateChecker_CheckForUpdate_Call {
79 return &MockUpdateChecker_CheckForUpdate_Call{Call: _e.mock.On("CheckForUpdate", ctx, currentVersion)}
80}
81
82func (_c *MockUpdateChecker_CheckForUpdate_Call) Run(run func(ctx context.Context, currentVersion string)) *MockUpdateChecker_CheckForUpdate_Call {
83 _c.Call.Run(func(args mock.Arguments) {
84 var arg0 context.Context
85 if args[0] != nil {
86 arg0 = args[0].(context.Context)
87 }
88 var arg1 string
89 if args[1] != nil {
90 arg1 = args[1].(string)
91 }
92 run(
93 arg0,
94 arg1,
95 )
96 })
97 return _c
98}
99
100func (_c *MockUpdateChecker_CheckForUpdate_Call) Return(updateInfo *entity.UpdateInfo, err error) *MockUpdateChecker_CheckForUpdate_Call {
101 _c.Call.Return(updateInfo, err)
102 return _c
103}
104
105func (_c *MockUpdateChecker_CheckForUpdate_Call) RunAndReturn(run func(ctx context.Context, currentVersion string) (*entity.UpdateInfo, error)) *MockUpdateChecker_CheckForUpdate_Call {
106 _c.Call.Return(run)
107 return _c
108}
109
110// NewMockUpdateDownloader creates a new instance of MockUpdateDownloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
111// The first argument is typically a *testing.T value.
112func NewMockUpdateDownloader(t interface {
113 mock.TestingT
114 Cleanup(func())
115}) *MockUpdateDownloader {
116 mock := &MockUpdateDownloader{}
117 mock.Mock.Test(t)
118
119 t.Cleanup(func() { mock.AssertExpectations(t) })
120
121 return mock
122}
123
124// MockUpdateDownloader is an autogenerated mock type for the UpdateDownloader type
125type MockUpdateDownloader struct {
126 mock.Mock
127}
128
129type MockUpdateDownloader_Expecter struct {
130 mock *mock.Mock
131}
132
133func (_m *MockUpdateDownloader) EXPECT() *MockUpdateDownloader_Expecter {
134 return &MockUpdateDownloader_Expecter{mock: &_m.Mock}
135}
136
137// Download provides a mock function for the type MockUpdateDownloader
138func (_mock *MockUpdateDownloader) Download(ctx context.Context, downloadURL string, destDir string) (string, error) {
139 ret := _mock.Called(ctx, downloadURL, destDir)
140
141 if len(ret) == 0 {
142 panic("no return value specified for Download")
143 }
144
145 var r0 string
146 var r1 error
147 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
148 return returnFunc(ctx, downloadURL, destDir)
149 }
150 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
151 r0 = returnFunc(ctx, downloadURL, destDir)
152 } else {
153 r0 = ret.Get(0).(string)
154 }
155 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
156 r1 = returnFunc(ctx, downloadURL, destDir)
157 } else {
158 r1 = ret.Error(1)
159 }
160 return r0, r1
161}
162
163// MockUpdateDownloader_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'
164type MockUpdateDownloader_Download_Call struct {
165 *mock.Call
166}
167
168// Download is a helper method to define mock.On call
169// - ctx context.Context
170// - downloadURL string
171// - destDir string
172func (_e *MockUpdateDownloader_Expecter) Download(ctx any, downloadURL any, destDir any) *MockUpdateDownloader_Download_Call {
173 return &MockUpdateDownloader_Download_Call{Call: _e.mock.On("Download", ctx, downloadURL, destDir)}
174}
175
176func (_c *MockUpdateDownloader_Download_Call) Run(run func(ctx context.Context, downloadURL string, destDir string)) *MockUpdateDownloader_Download_Call {
177 _c.Call.Run(func(args mock.Arguments) {
178 var arg0 context.Context
179 if args[0] != nil {
180 arg0 = args[0].(context.Context)
181 }
182 var arg1 string
183 if args[1] != nil {
184 arg1 = args[1].(string)
185 }
186 var arg2 string
187 if args[2] != nil {
188 arg2 = args[2].(string)
189 }
190 run(
191 arg0,
192 arg1,
193 arg2,
194 )
195 })
196 return _c
197}
198
199func (_c *MockUpdateDownloader_Download_Call) Return(archivePath string, err error) *MockUpdateDownloader_Download_Call {
200 _c.Call.Return(archivePath, err)
201 return _c
202}
203
204func (_c *MockUpdateDownloader_Download_Call) RunAndReturn(run func(ctx context.Context, downloadURL string, destDir string) (string, error)) *MockUpdateDownloader_Download_Call {
205 _c.Call.Return(run)
206 return _c
207}
208
209// Extract provides a mock function for the type MockUpdateDownloader
210func (_mock *MockUpdateDownloader) Extract(ctx context.Context, archivePath string, destDir string) (string, error) {
211 ret := _mock.Called(ctx, archivePath, destDir)
212
213 if len(ret) == 0 {
214 panic("no return value specified for Extract")
215 }
216
217 var r0 string
218 var r1 error
219 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
220 return returnFunc(ctx, archivePath, destDir)
221 }
222 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
223 r0 = returnFunc(ctx, archivePath, destDir)
224 } else {
225 r0 = ret.Get(0).(string)
226 }
227 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
228 r1 = returnFunc(ctx, archivePath, destDir)
229 } else {
230 r1 = ret.Error(1)
231 }
232 return r0, r1
233}
234
235// MockUpdateDownloader_Extract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extract'
236type MockUpdateDownloader_Extract_Call struct {
237 *mock.Call
238}
239
240// Extract is a helper method to define mock.On call
241// - ctx context.Context
242// - archivePath string
243// - destDir string
244func (_e *MockUpdateDownloader_Expecter) Extract(ctx any, archivePath any, destDir any) *MockUpdateDownloader_Extract_Call {
245 return &MockUpdateDownloader_Extract_Call{Call: _e.mock.On("Extract", ctx, archivePath, destDir)}
246}
247
248func (_c *MockUpdateDownloader_Extract_Call) Run(run func(ctx context.Context, archivePath string, destDir string)) *MockUpdateDownloader_Extract_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 string
255 if args[1] != nil {
256 arg1 = args[1].(string)
257 }
258 var arg2 string
259 if args[2] != nil {
260 arg2 = args[2].(string)
261 }
262 run(
263 arg0,
264 arg1,
265 arg2,
266 )
267 })
268 return _c
269}
270
271func (_c *MockUpdateDownloader_Extract_Call) Return(binaryPath string, err error) *MockUpdateDownloader_Extract_Call {
272 _c.Call.Return(binaryPath, err)
273 return _c
274}
275
276func (_c *MockUpdateDownloader_Extract_Call) RunAndReturn(run func(ctx context.Context, archivePath string, destDir string) (string, error)) *MockUpdateDownloader_Extract_Call {
277 _c.Call.Return(run)
278 return _c
279}
280
281// NewMockUpdateApplier creates a new instance of MockUpdateApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
282// The first argument is typically a *testing.T value.
283func NewMockUpdateApplier(t interface {
284 mock.TestingT
285 Cleanup(func())
286}) *MockUpdateApplier {
287 mock := &MockUpdateApplier{}
288 mock.Mock.Test(t)
289
290 t.Cleanup(func() { mock.AssertExpectations(t) })
291
292 return mock
293}
294
295// MockUpdateApplier is an autogenerated mock type for the UpdateApplier type
296type MockUpdateApplier struct {
297 mock.Mock
298}
299
300type MockUpdateApplier_Expecter struct {
301 mock *mock.Mock
302}
303
304func (_m *MockUpdateApplier) EXPECT() *MockUpdateApplier_Expecter {
305 return &MockUpdateApplier_Expecter{mock: &_m.Mock}
306}
307
308// ApplyOnExit provides a mock function for the type MockUpdateApplier
309func (_mock *MockUpdateApplier) ApplyOnExit(ctx context.Context) (string, error) {
310 ret := _mock.Called(ctx)
311
312 if len(ret) == 0 {
313 panic("no return value specified for ApplyOnExit")
314 }
315
316 var r0 string
317 var r1 error
318 if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok {
319 return returnFunc(ctx)
320 }
321 if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok {
322 r0 = returnFunc(ctx)
323 } else {
324 r0 = ret.Get(0).(string)
325 }
326 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
327 r1 = returnFunc(ctx)
328 } else {
329 r1 = ret.Error(1)
330 }
331 return r0, r1
332}
333
334// MockUpdateApplier_ApplyOnExit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyOnExit'
335type MockUpdateApplier_ApplyOnExit_Call struct {
336 *mock.Call
337}
338
339// ApplyOnExit is a helper method to define mock.On call
340// - ctx context.Context
341func (_e *MockUpdateApplier_Expecter) ApplyOnExit(ctx any) *MockUpdateApplier_ApplyOnExit_Call {
342 return &MockUpdateApplier_ApplyOnExit_Call{Call: _e.mock.On("ApplyOnExit", ctx)}
343}
344
345func (_c *MockUpdateApplier_ApplyOnExit_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ApplyOnExit_Call {
346 _c.Call.Run(func(args mock.Arguments) {
347 var arg0 context.Context
348 if args[0] != nil {
349 arg0 = args[0].(context.Context)
350 }
351 run(
352 arg0,
353 )
354 })
355 return _c
356}
357
358func (_c *MockUpdateApplier_ApplyOnExit_Call) Return(backupPath string, err error) *MockUpdateApplier_ApplyOnExit_Call {
359 _c.Call.Return(backupPath, err)
360 return _c
361}
362
363func (_c *MockUpdateApplier_ApplyOnExit_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockUpdateApplier_ApplyOnExit_Call {
364 _c.Call.Return(run)
365 return _c
366}
367
368// CanSelfUpdate provides a mock function for the type MockUpdateApplier
369func (_mock *MockUpdateApplier) CanSelfUpdate(ctx context.Context) bool {
370 ret := _mock.Called(ctx)
371
372 if len(ret) == 0 {
373 panic("no return value specified for CanSelfUpdate")
374 }
375
376 var r0 bool
377 if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
378 r0 = returnFunc(ctx)
379 } else {
380 r0 = ret.Get(0).(bool)
381 }
382 return r0
383}
384
385// MockUpdateApplier_CanSelfUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CanSelfUpdate'
386type MockUpdateApplier_CanSelfUpdate_Call struct {
387 *mock.Call
388}
389
390// CanSelfUpdate is a helper method to define mock.On call
391// - ctx context.Context
392func (_e *MockUpdateApplier_Expecter) CanSelfUpdate(ctx any) *MockUpdateApplier_CanSelfUpdate_Call {
393 return &MockUpdateApplier_CanSelfUpdate_Call{Call: _e.mock.On("CanSelfUpdate", ctx)}
394}
395
396func (_c *MockUpdateApplier_CanSelfUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_CanSelfUpdate_Call {
397 _c.Call.Run(func(args mock.Arguments) {
398 var arg0 context.Context
399 if args[0] != nil {
400 arg0 = args[0].(context.Context)
401 }
402 run(
403 arg0,
404 )
405 })
406 return _c
407}
408
409func (_c *MockUpdateApplier_CanSelfUpdate_Call) Return(b bool) *MockUpdateApplier_CanSelfUpdate_Call {
410 _c.Call.Return(b)
411 return _c
412}
413
414func (_c *MockUpdateApplier_CanSelfUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_CanSelfUpdate_Call {
415 _c.Call.Return(run)
416 return _c
417}
418
419// ClearStagedUpdate provides a mock function for the type MockUpdateApplier
420func (_mock *MockUpdateApplier) ClearStagedUpdate(ctx context.Context) error {
421 ret := _mock.Called(ctx)
422
423 if len(ret) == 0 {
424 panic("no return value specified for ClearStagedUpdate")
425 }
426
427 var r0 error
428 if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
429 r0 = returnFunc(ctx)
430 } else {
431 r0 = ret.Error(0)
432 }
433 return r0
434}
435
436// MockUpdateApplier_ClearStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearStagedUpdate'
437type MockUpdateApplier_ClearStagedUpdate_Call struct {
438 *mock.Call
439}
440
441// ClearStagedUpdate is a helper method to define mock.On call
442// - ctx context.Context
443func (_e *MockUpdateApplier_Expecter) ClearStagedUpdate(ctx any) *MockUpdateApplier_ClearStagedUpdate_Call {
444 return &MockUpdateApplier_ClearStagedUpdate_Call{Call: _e.mock.On("ClearStagedUpdate", ctx)}
445}
446
447func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_ClearStagedUpdate_Call {
448 _c.Call.Run(func(args mock.Arguments) {
449 var arg0 context.Context
450 if args[0] != nil {
451 arg0 = args[0].(context.Context)
452 }
453 run(
454 arg0,
455 )
456 })
457 return _c
458}
459
460func (_c *MockUpdateApplier_ClearStagedUpdate_Call) Return(err error) *MockUpdateApplier_ClearStagedUpdate_Call {
461 _c.Call.Return(err)
462 return _c
463}
464
465func (_c *MockUpdateApplier_ClearStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) error) *MockUpdateApplier_ClearStagedUpdate_Call {
466 _c.Call.Return(run)
467 return _c
468}
469
470// GetBinaryPath provides a mock function for the type MockUpdateApplier
471func (_mock *MockUpdateApplier) GetBinaryPath() (string, error) {
472 ret := _mock.Called()
473
474 if len(ret) == 0 {
475 panic("no return value specified for GetBinaryPath")
476 }
477
478 var r0 string
479 var r1 error
480 if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
481 return returnFunc()
482 }
483 if returnFunc, ok := ret.Get(0).(func() string); ok {
484 r0 = returnFunc()
485 } else {
486 r0 = ret.Get(0).(string)
487 }
488 if returnFunc, ok := ret.Get(1).(func() error); ok {
489 r1 = returnFunc()
490 } else {
491 r1 = ret.Error(1)
492 }
493 return r0, r1
494}
495
496// MockUpdateApplier_GetBinaryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBinaryPath'
497type MockUpdateApplier_GetBinaryPath_Call struct {
498 *mock.Call
499}
500
501// GetBinaryPath is a helper method to define mock.On call
502func (_e *MockUpdateApplier_Expecter) GetBinaryPath() *MockUpdateApplier_GetBinaryPath_Call {
503 return &MockUpdateApplier_GetBinaryPath_Call{Call: _e.mock.On("GetBinaryPath")}
504}
505
506func (_c *MockUpdateApplier_GetBinaryPath_Call) Run(run func()) *MockUpdateApplier_GetBinaryPath_Call {
507 _c.Call.Run(func(args mock.Arguments) {
508 run()
509 })
510 return _c
511}
512
513func (_c *MockUpdateApplier_GetBinaryPath_Call) Return(s string, err error) *MockUpdateApplier_GetBinaryPath_Call {
514 _c.Call.Return(s, err)
515 return _c
516}
517
518func (_c *MockUpdateApplier_GetBinaryPath_Call) RunAndReturn(run func() (string, error)) *MockUpdateApplier_GetBinaryPath_Call {
519 _c.Call.Return(run)
520 return _c
521}
522
523// HasStagedUpdate provides a mock function for the type MockUpdateApplier
524func (_mock *MockUpdateApplier) HasStagedUpdate(ctx context.Context) bool {
525 ret := _mock.Called(ctx)
526
527 if len(ret) == 0 {
528 panic("no return value specified for HasStagedUpdate")
529 }
530
531 var r0 bool
532 if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
533 r0 = returnFunc(ctx)
534 } else {
535 r0 = ret.Get(0).(bool)
536 }
537 return r0
538}
539
540// MockUpdateApplier_HasStagedUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasStagedUpdate'
541type MockUpdateApplier_HasStagedUpdate_Call struct {
542 *mock.Call
543}
544
545// HasStagedUpdate is a helper method to define mock.On call
546// - ctx context.Context
547func (_e *MockUpdateApplier_Expecter) HasStagedUpdate(ctx any) *MockUpdateApplier_HasStagedUpdate_Call {
548 return &MockUpdateApplier_HasStagedUpdate_Call{Call: _e.mock.On("HasStagedUpdate", ctx)}
549}
550
551func (_c *MockUpdateApplier_HasStagedUpdate_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_HasStagedUpdate_Call {
552 _c.Call.Run(func(args mock.Arguments) {
553 var arg0 context.Context
554 if args[0] != nil {
555 arg0 = args[0].(context.Context)
556 }
557 run(
558 arg0,
559 )
560 })
561 return _c
562}
563
564func (_c *MockUpdateApplier_HasStagedUpdate_Call) Return(b bool) *MockUpdateApplier_HasStagedUpdate_Call {
565 _c.Call.Return(b)
566 return _c
567}
568
569func (_c *MockUpdateApplier_HasStagedUpdate_Call) RunAndReturn(run func(ctx context.Context) bool) *MockUpdateApplier_HasStagedUpdate_Call {
570 _c.Call.Return(run)
571 return _c
572}
573
574// SelfUpdateBlockedReason provides a mock function for the type MockUpdateApplier
575func (_mock *MockUpdateApplier) SelfUpdateBlockedReason(ctx context.Context) port.SelfUpdateBlockedReason {
576 ret := _mock.Called(ctx)
577
578 if len(ret) == 0 {
579 panic("no return value specified for SelfUpdateBlockedReason")
580 }
581
582 var r0 port.SelfUpdateBlockedReason
583 if returnFunc, ok := ret.Get(0).(func(context.Context) port.SelfUpdateBlockedReason); ok {
584 r0 = returnFunc(ctx)
585 } else {
586 r0 = ret.Get(0).(port.SelfUpdateBlockedReason)
587 }
588 return r0
589}
590
591// MockUpdateApplier_SelfUpdateBlockedReason_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelfUpdateBlockedReason'
592type MockUpdateApplier_SelfUpdateBlockedReason_Call struct {
593 *mock.Call
594}
595
596// SelfUpdateBlockedReason is a helper method to define mock.On call
597// - ctx context.Context
598func (_e *MockUpdateApplier_Expecter) SelfUpdateBlockedReason(ctx any) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
599 return &MockUpdateApplier_SelfUpdateBlockedReason_Call{Call: _e.mock.On("SelfUpdateBlockedReason", ctx)}
600}
601
602func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Run(run func(ctx context.Context)) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
603 _c.Call.Run(func(args mock.Arguments) {
604 var arg0 context.Context
605 if args[0] != nil {
606 arg0 = args[0].(context.Context)
607 }
608 run(
609 arg0,
610 )
611 })
612 return _c
613}
614
615func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) Return(selfUpdateBlockedReason port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
616 _c.Call.Return(selfUpdateBlockedReason)
617 return _c
618}
619
620func (_c *MockUpdateApplier_SelfUpdateBlockedReason_Call) RunAndReturn(run func(ctx context.Context) port.SelfUpdateBlockedReason) *MockUpdateApplier_SelfUpdateBlockedReason_Call {
621 _c.Call.Return(run)
622 return _c
623}
624
625// StageUpdate provides a mock function for the type MockUpdateApplier
626func (_mock *MockUpdateApplier) StageUpdate(ctx context.Context, newBinaryPath string) error {
627 ret := _mock.Called(ctx, newBinaryPath)
628
629 if len(ret) == 0 {
630 panic("no return value specified for StageUpdate")
631 }
632
633 var r0 error
634 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
635 r0 = returnFunc(ctx, newBinaryPath)
636 } else {
637 r0 = ret.Error(0)
638 }
639 return r0
640}
641
642// MockUpdateApplier_StageUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StageUpdate'
643type MockUpdateApplier_StageUpdate_Call struct {
644 *mock.Call
645}
646
647// StageUpdate is a helper method to define mock.On call
648// - ctx context.Context
649// - newBinaryPath string
650func (_e *MockUpdateApplier_Expecter) StageUpdate(ctx any, newBinaryPath any) *MockUpdateApplier_StageUpdate_Call {
651 return &MockUpdateApplier_StageUpdate_Call{Call: _e.mock.On("StageUpdate", ctx, newBinaryPath)}
652}
653
654func (_c *MockUpdateApplier_StageUpdate_Call) Run(run func(ctx context.Context, newBinaryPath string)) *MockUpdateApplier_StageUpdate_Call {
655 _c.Call.Run(func(args mock.Arguments) {
656 var arg0 context.Context
657 if args[0] != nil {
658 arg0 = args[0].(context.Context)
659 }
660 var arg1 string
661 if args[1] != nil {
662 arg1 = args[1].(string)
663 }
664 run(
665 arg0,
666 arg1,
667 )
668 })
669 return _c
670}
671
672func (_c *MockUpdateApplier_StageUpdate_Call) Return(err error) *MockUpdateApplier_StageUpdate_Call {
673 _c.Call.Return(err)
674 return _c
675}
676
677func (_c *MockUpdateApplier_StageUpdate_Call) RunAndReturn(run func(ctx context.Context, newBinaryPath string) error) *MockUpdateApplier_StageUpdate_Call {
678 _c.Call.Return(run)
679 return _c
680}