v2.2.1 99f5ba4

mock_container_service.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9	"gordon/internal/domain"
10
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockContainerService creates a new instance of MockContainerService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockContainerService(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockContainerService {
20	mock := &MockContainerService{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockContainerService is an autogenerated mock type for the ContainerService type
29type MockContainerService struct {
30	mock.Mock
31}
32
33type MockContainerService_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockContainerService) EXPECT() *MockContainerService_Expecter {
38	return &MockContainerService_Expecter{mock: &_m.Mock}
39}
40
41// AutoStart provides a mock function for the type MockContainerService
42func (_mock *MockContainerService) AutoStart(ctx context.Context, routes []domain.Route) error {
43	ret := _mock.Called(ctx, routes)
44
45	if len(ret) == 0 {
46		panic("no return value specified for AutoStart")
47	}
48
49	var r0 error
50	if returnFunc, ok := ret.Get(0).(func(context.Context, []domain.Route) error); ok {
51		r0 = returnFunc(ctx, routes)
52	} else {
53		r0 = ret.Error(0)
54	}
55	return r0
56}
57
58// MockContainerService_AutoStart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AutoStart'
59type MockContainerService_AutoStart_Call struct {
60	*mock.Call
61}
62
63// AutoStart is a helper method to define mock.On call
64//   - ctx context.Context
65//   - routes []domain.Route
66func (_e *MockContainerService_Expecter) AutoStart(ctx interface{}, routes interface{}) *MockContainerService_AutoStart_Call {
67	return &MockContainerService_AutoStart_Call{Call: _e.mock.On("AutoStart", ctx, routes)}
68}
69
70func (_c *MockContainerService_AutoStart_Call) Run(run func(ctx context.Context, routes []domain.Route)) *MockContainerService_AutoStart_Call {
71	_c.Call.Run(func(args mock.Arguments) {
72		var arg0 context.Context
73		if args[0] != nil {
74			arg0 = args[0].(context.Context)
75		}
76		var arg1 []domain.Route
77		if args[1] != nil {
78			arg1 = args[1].([]domain.Route)
79		}
80		run(
81			arg0,
82			arg1,
83		)
84	})
85	return _c
86}
87
88func (_c *MockContainerService_AutoStart_Call) Return(err error) *MockContainerService_AutoStart_Call {
89	_c.Call.Return(err)
90	return _c
91}
92
93func (_c *MockContainerService_AutoStart_Call) RunAndReturn(run func(ctx context.Context, routes []domain.Route) error) *MockContainerService_AutoStart_Call {
94	_c.Call.Return(run)
95	return _c
96}
97
98// Deploy provides a mock function for the type MockContainerService
99func (_mock *MockContainerService) Deploy(ctx context.Context, route domain.Route) (*domain.Container, error) {
100	ret := _mock.Called(ctx, route)
101
102	if len(ret) == 0 {
103		panic("no return value specified for Deploy")
104	}
105
106	var r0 *domain.Container
107	var r1 error
108	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) (*domain.Container, error)); ok {
109		return returnFunc(ctx, route)
110	}
111	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Route) *domain.Container); ok {
112		r0 = returnFunc(ctx, route)
113	} else {
114		if ret.Get(0) != nil {
115			r0 = ret.Get(0).(*domain.Container)
116		}
117	}
118	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Route) error); ok {
119		r1 = returnFunc(ctx, route)
120	} else {
121		r1 = ret.Error(1)
122	}
123	return r0, r1
124}
125
126// MockContainerService_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy'
127type MockContainerService_Deploy_Call struct {
128	*mock.Call
129}
130
131// Deploy is a helper method to define mock.On call
132//   - ctx context.Context
133//   - route domain.Route
134func (_e *MockContainerService_Expecter) Deploy(ctx interface{}, route interface{}) *MockContainerService_Deploy_Call {
135	return &MockContainerService_Deploy_Call{Call: _e.mock.On("Deploy", ctx, route)}
136}
137
138func (_c *MockContainerService_Deploy_Call) Run(run func(ctx context.Context, route domain.Route)) *MockContainerService_Deploy_Call {
139	_c.Call.Run(func(args mock.Arguments) {
140		var arg0 context.Context
141		if args[0] != nil {
142			arg0 = args[0].(context.Context)
143		}
144		var arg1 domain.Route
145		if args[1] != nil {
146			arg1 = args[1].(domain.Route)
147		}
148		run(
149			arg0,
150			arg1,
151		)
152	})
153	return _c
154}
155
156func (_c *MockContainerService_Deploy_Call) Return(container *domain.Container, err error) *MockContainerService_Deploy_Call {
157	_c.Call.Return(container, err)
158	return _c
159}
160
161func (_c *MockContainerService_Deploy_Call) RunAndReturn(run func(ctx context.Context, route domain.Route) (*domain.Container, error)) *MockContainerService_Deploy_Call {
162	_c.Call.Return(run)
163	return _c
164}
165
166// Get provides a mock function for the type MockContainerService
167func (_mock *MockContainerService) Get(ctx context.Context, domain1 string) (*domain.Container, bool) {
168	ret := _mock.Called(ctx, domain1)
169
170	if len(ret) == 0 {
171		panic("no return value specified for Get")
172	}
173
174	var r0 *domain.Container
175	var r1 bool
176	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*domain.Container, bool)); ok {
177		return returnFunc(ctx, domain1)
178	}
179	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *domain.Container); ok {
180		r0 = returnFunc(ctx, domain1)
181	} else {
182		if ret.Get(0) != nil {
183			r0 = ret.Get(0).(*domain.Container)
184		}
185	}
186	if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
187		r1 = returnFunc(ctx, domain1)
188	} else {
189		r1 = ret.Get(1).(bool)
190	}
191	return r0, r1
192}
193
194// MockContainerService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
195type MockContainerService_Get_Call struct {
196	*mock.Call
197}
198
199// Get is a helper method to define mock.On call
200//   - ctx context.Context
201//   - domain1 string
202func (_e *MockContainerService_Expecter) Get(ctx interface{}, domain1 interface{}) *MockContainerService_Get_Call {
203	return &MockContainerService_Get_Call{Call: _e.mock.On("Get", ctx, domain1)}
204}
205
206func (_c *MockContainerService_Get_Call) Run(run func(ctx context.Context, domain1 string)) *MockContainerService_Get_Call {
207	_c.Call.Run(func(args mock.Arguments) {
208		var arg0 context.Context
209		if args[0] != nil {
210			arg0 = args[0].(context.Context)
211		}
212		var arg1 string
213		if args[1] != nil {
214			arg1 = args[1].(string)
215		}
216		run(
217			arg0,
218			arg1,
219		)
220	})
221	return _c
222}
223
224func (_c *MockContainerService_Get_Call) Return(container *domain.Container, b bool) *MockContainerService_Get_Call {
225	_c.Call.Return(container, b)
226	return _c
227}
228
229func (_c *MockContainerService_Get_Call) RunAndReturn(run func(ctx context.Context, domain1 string) (*domain.Container, bool)) *MockContainerService_Get_Call {
230	_c.Call.Return(run)
231	return _c
232}
233
234// HealthCheck provides a mock function for the type MockContainerService
235func (_mock *MockContainerService) HealthCheck(ctx context.Context) map[string]bool {
236	ret := _mock.Called(ctx)
237
238	if len(ret) == 0 {
239		panic("no return value specified for HealthCheck")
240	}
241
242	var r0 map[string]bool
243	if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]bool); ok {
244		r0 = returnFunc(ctx)
245	} else {
246		if ret.Get(0) != nil {
247			r0 = ret.Get(0).(map[string]bool)
248		}
249	}
250	return r0
251}
252
253// MockContainerService_HealthCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthCheck'
254type MockContainerService_HealthCheck_Call struct {
255	*mock.Call
256}
257
258// HealthCheck is a helper method to define mock.On call
259//   - ctx context.Context
260func (_e *MockContainerService_Expecter) HealthCheck(ctx interface{}) *MockContainerService_HealthCheck_Call {
261	return &MockContainerService_HealthCheck_Call{Call: _e.mock.On("HealthCheck", ctx)}
262}
263
264func (_c *MockContainerService_HealthCheck_Call) Run(run func(ctx context.Context)) *MockContainerService_HealthCheck_Call {
265	_c.Call.Run(func(args mock.Arguments) {
266		var arg0 context.Context
267		if args[0] != nil {
268			arg0 = args[0].(context.Context)
269		}
270		run(
271			arg0,
272		)
273	})
274	return _c
275}
276
277func (_c *MockContainerService_HealthCheck_Call) Return(stringToBool map[string]bool) *MockContainerService_HealthCheck_Call {
278	_c.Call.Return(stringToBool)
279	return _c
280}
281
282func (_c *MockContainerService_HealthCheck_Call) RunAndReturn(run func(ctx context.Context) map[string]bool) *MockContainerService_HealthCheck_Call {
283	_c.Call.Return(run)
284	return _c
285}
286
287// List provides a mock function for the type MockContainerService
288func (_mock *MockContainerService) List(ctx context.Context) map[string]*domain.Container {
289	ret := _mock.Called(ctx)
290
291	if len(ret) == 0 {
292		panic("no return value specified for List")
293	}
294
295	var r0 map[string]*domain.Container
296	if returnFunc, ok := ret.Get(0).(func(context.Context) map[string]*domain.Container); ok {
297		r0 = returnFunc(ctx)
298	} else {
299		if ret.Get(0) != nil {
300			r0 = ret.Get(0).(map[string]*domain.Container)
301		}
302	}
303	return r0
304}
305
306// MockContainerService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
307type MockContainerService_List_Call struct {
308	*mock.Call
309}
310
311// List is a helper method to define mock.On call
312//   - ctx context.Context
313func (_e *MockContainerService_Expecter) List(ctx interface{}) *MockContainerService_List_Call {
314	return &MockContainerService_List_Call{Call: _e.mock.On("List", ctx)}
315}
316
317func (_c *MockContainerService_List_Call) Run(run func(ctx context.Context)) *MockContainerService_List_Call {
318	_c.Call.Run(func(args mock.Arguments) {
319		var arg0 context.Context
320		if args[0] != nil {
321			arg0 = args[0].(context.Context)
322		}
323		run(
324			arg0,
325		)
326	})
327	return _c
328}
329
330func (_c *MockContainerService_List_Call) Return(stringToContainer map[string]*domain.Container) *MockContainerService_List_Call {
331	_c.Call.Return(stringToContainer)
332	return _c
333}
334
335func (_c *MockContainerService_List_Call) RunAndReturn(run func(ctx context.Context) map[string]*domain.Container) *MockContainerService_List_Call {
336	_c.Call.Return(run)
337	return _c
338}
339
340// Remove provides a mock function for the type MockContainerService
341func (_mock *MockContainerService) Remove(ctx context.Context, containerID string, force bool) error {
342	ret := _mock.Called(ctx, containerID, force)
343
344	if len(ret) == 0 {
345		panic("no return value specified for Remove")
346	}
347
348	var r0 error
349	if returnFunc, ok := ret.Get(0).(func(context.Context, string, bool) error); ok {
350		r0 = returnFunc(ctx, containerID, force)
351	} else {
352		r0 = ret.Error(0)
353	}
354	return r0
355}
356
357// MockContainerService_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
358type MockContainerService_Remove_Call struct {
359	*mock.Call
360}
361
362// Remove is a helper method to define mock.On call
363//   - ctx context.Context
364//   - containerID string
365//   - force bool
366func (_e *MockContainerService_Expecter) Remove(ctx interface{}, containerID interface{}, force interface{}) *MockContainerService_Remove_Call {
367	return &MockContainerService_Remove_Call{Call: _e.mock.On("Remove", ctx, containerID, force)}
368}
369
370func (_c *MockContainerService_Remove_Call) Run(run func(ctx context.Context, containerID string, force bool)) *MockContainerService_Remove_Call {
371	_c.Call.Run(func(args mock.Arguments) {
372		var arg0 context.Context
373		if args[0] != nil {
374			arg0 = args[0].(context.Context)
375		}
376		var arg1 string
377		if args[1] != nil {
378			arg1 = args[1].(string)
379		}
380		var arg2 bool
381		if args[2] != nil {
382			arg2 = args[2].(bool)
383		}
384		run(
385			arg0,
386			arg1,
387			arg2,
388		)
389	})
390	return _c
391}
392
393func (_c *MockContainerService_Remove_Call) Return(err error) *MockContainerService_Remove_Call {
394	_c.Call.Return(err)
395	return _c
396}
397
398func (_c *MockContainerService_Remove_Call) RunAndReturn(run func(ctx context.Context, containerID string, force bool) error) *MockContainerService_Remove_Call {
399	_c.Call.Return(run)
400	return _c
401}
402
403// Shutdown provides a mock function for the type MockContainerService
404func (_mock *MockContainerService) Shutdown(ctx context.Context) error {
405	ret := _mock.Called(ctx)
406
407	if len(ret) == 0 {
408		panic("no return value specified for Shutdown")
409	}
410
411	var r0 error
412	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
413		r0 = returnFunc(ctx)
414	} else {
415		r0 = ret.Error(0)
416	}
417	return r0
418}
419
420// MockContainerService_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
421type MockContainerService_Shutdown_Call struct {
422	*mock.Call
423}
424
425// Shutdown is a helper method to define mock.On call
426//   - ctx context.Context
427func (_e *MockContainerService_Expecter) Shutdown(ctx interface{}) *MockContainerService_Shutdown_Call {
428	return &MockContainerService_Shutdown_Call{Call: _e.mock.On("Shutdown", ctx)}
429}
430
431func (_c *MockContainerService_Shutdown_Call) Run(run func(ctx context.Context)) *MockContainerService_Shutdown_Call {
432	_c.Call.Run(func(args mock.Arguments) {
433		var arg0 context.Context
434		if args[0] != nil {
435			arg0 = args[0].(context.Context)
436		}
437		run(
438			arg0,
439		)
440	})
441	return _c
442}
443
444func (_c *MockContainerService_Shutdown_Call) Return(err error) *MockContainerService_Shutdown_Call {
445	_c.Call.Return(err)
446	return _c
447}
448
449func (_c *MockContainerService_Shutdown_Call) RunAndReturn(run func(ctx context.Context) error) *MockContainerService_Shutdown_Call {
450	_c.Call.Return(run)
451	return _c
452}
453
454// Stop provides a mock function for the type MockContainerService
455func (_mock *MockContainerService) Stop(ctx context.Context, containerID string) error {
456	ret := _mock.Called(ctx, containerID)
457
458	if len(ret) == 0 {
459		panic("no return value specified for Stop")
460	}
461
462	var r0 error
463	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
464		r0 = returnFunc(ctx, containerID)
465	} else {
466		r0 = ret.Error(0)
467	}
468	return r0
469}
470
471// MockContainerService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
472type MockContainerService_Stop_Call struct {
473	*mock.Call
474}
475
476// Stop is a helper method to define mock.On call
477//   - ctx context.Context
478//   - containerID string
479func (_e *MockContainerService_Expecter) Stop(ctx interface{}, containerID interface{}) *MockContainerService_Stop_Call {
480	return &MockContainerService_Stop_Call{Call: _e.mock.On("Stop", ctx, containerID)}
481}
482
483func (_c *MockContainerService_Stop_Call) Run(run func(ctx context.Context, containerID string)) *MockContainerService_Stop_Call {
484	_c.Call.Run(func(args mock.Arguments) {
485		var arg0 context.Context
486		if args[0] != nil {
487			arg0 = args[0].(context.Context)
488		}
489		var arg1 string
490		if args[1] != nil {
491			arg1 = args[1].(string)
492		}
493		run(
494			arg0,
495			arg1,
496		)
497	})
498	return _c
499}
500
501func (_c *MockContainerService_Stop_Call) Return(err error) *MockContainerService_Stop_Call {
502	_c.Call.Return(err)
503	return _c
504}
505
506func (_c *MockContainerService_Stop_Call) RunAndReturn(run func(ctx context.Context, containerID string) error) *MockContainerService_Stop_Call {
507	_c.Call.Return(run)
508	return _c
509}
510
511// SyncContainers provides a mock function for the type MockContainerService
512func (_mock *MockContainerService) SyncContainers(ctx context.Context) error {
513	ret := _mock.Called(ctx)
514
515	if len(ret) == 0 {
516		panic("no return value specified for SyncContainers")
517	}
518
519	var r0 error
520	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
521		r0 = returnFunc(ctx)
522	} else {
523		r0 = ret.Error(0)
524	}
525	return r0
526}
527
528// MockContainerService_SyncContainers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncContainers'
529type MockContainerService_SyncContainers_Call struct {
530	*mock.Call
531}
532
533// SyncContainers is a helper method to define mock.On call
534//   - ctx context.Context
535func (_e *MockContainerService_Expecter) SyncContainers(ctx interface{}) *MockContainerService_SyncContainers_Call {
536	return &MockContainerService_SyncContainers_Call{Call: _e.mock.On("SyncContainers", ctx)}
537}
538
539func (_c *MockContainerService_SyncContainers_Call) Run(run func(ctx context.Context)) *MockContainerService_SyncContainers_Call {
540	_c.Call.Run(func(args mock.Arguments) {
541		var arg0 context.Context
542		if args[0] != nil {
543			arg0 = args[0].(context.Context)
544		}
545		run(
546			arg0,
547		)
548	})
549	return _c
550}
551
552func (_c *MockContainerService_SyncContainers_Call) Return(err error) *MockContainerService_SyncContainers_Call {
553	_c.Call.Return(err)
554	return _c
555}
556
557func (_c *MockContainerService_SyncContainers_Call) RunAndReturn(run func(ctx context.Context) error) *MockContainerService_SyncContainers_Call {
558	_c.Call.Return(run)
559	return _c
560}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close