refactor/kvconf 3421f16

visual_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package visual
6
7import (
8	"context"
9	"io"
10
11	mock "github.com/stretchr/testify/mock"
12)
13
14// newMockworkerLauncher creates a new instance of mockworkerLauncher. 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 newMockworkerLauncher(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *mockworkerLauncher {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &mockworkerLauncher{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// mockworkerLauncher is an autogenerated mock type for the workerLauncher type
38type mockworkerLauncher struct {
39	mock.Mock
40}
41
42type mockworkerLauncher_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *mockworkerLauncher) EXPECT() *mockworkerLauncher_Expecter {
47	return &mockworkerLauncher_Expecter{mock: &_m.Mock}
48}
49
50// launch provides a mock function for the type mockworkerLauncher
51func (_mock *mockworkerLauncher) launch(ctx context.Context) (workerProcess, error) {
52	ret := _mock.Called(ctx)
53
54	if len(ret) == 0 {
55		panic("no return value specified for launch")
56	}
57
58	var r0 workerProcess
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) (workerProcess, error)); ok {
61		return returnFunc(ctx)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context) workerProcess); ok {
64		r0 = returnFunc(ctx)
65	} else {
66		if ret.Get(0) != nil {
67			r0 = ret.Get(0).(workerProcess)
68		}
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71		r1 = returnFunc(ctx)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// mockworkerLauncher_launch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'launch'
79type mockworkerLauncher_launch_Call struct {
80	*mock.Call
81}
82
83// launch is a helper method to define mock.On call
84//   - ctx context.Context
85func (_e *mockworkerLauncher_Expecter) launch(ctx any) *mockworkerLauncher_launch_Call {
86	return &mockworkerLauncher_launch_Call{Call: _e.mock.On("launch", ctx)}
87}
88
89func (_c *mockworkerLauncher_launch_Call) Run(run func(ctx context.Context)) *mockworkerLauncher_launch_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *mockworkerLauncher_launch_Call) Return(workerProcessMoqParam workerProcess, err error) *mockworkerLauncher_launch_Call {
103	_c.Call.Return(workerProcessMoqParam, err)
104	return _c
105}
106
107func (_c *mockworkerLauncher_launch_Call) RunAndReturn(run func(ctx context.Context) (workerProcess, error)) *mockworkerLauncher_launch_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// newMockworkerProcess creates a new instance of mockworkerProcess. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
113// The first argument is typically a *testing.T value.
114func newMockworkerProcess(t interface {
115	mock.TestingT
116	Cleanup(func())
117}) *mockworkerProcess {
118	if helper, ok := t.(interface{ Helper() }); ok {
119		helper.Helper()
120	}
121
122	mock := &mockworkerProcess{}
123	mock.Mock.Test(t)
124
125	t.Cleanup(func() {
126		if helper, ok := t.(interface{ Helper() }); ok {
127			helper.Helper()
128		}
129		mock.AssertExpectations(t)
130	})
131
132	return mock
133}
134
135// mockworkerProcess is an autogenerated mock type for the workerProcess type
136type mockworkerProcess struct {
137	mock.Mock
138}
139
140type mockworkerProcess_Expecter struct {
141	mock *mock.Mock
142}
143
144func (_m *mockworkerProcess) EXPECT() *mockworkerProcess_Expecter {
145	return &mockworkerProcess_Expecter{mock: &_m.Mock}
146}
147
148// kill provides a mock function for the type mockworkerProcess
149func (_mock *mockworkerProcess) kill() error {
150	ret := _mock.Called()
151
152	if len(ret) == 0 {
153		panic("no return value specified for kill")
154	}
155
156	var r0 error
157	if returnFunc, ok := ret.Get(0).(func() error); ok {
158		r0 = returnFunc()
159	} else {
160		r0 = ret.Error(0)
161	}
162	return r0
163}
164
165// mockworkerProcess_kill_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'kill'
166type mockworkerProcess_kill_Call struct {
167	*mock.Call
168}
169
170// kill is a helper method to define mock.On call
171func (_e *mockworkerProcess_Expecter) kill() *mockworkerProcess_kill_Call {
172	return &mockworkerProcess_kill_Call{Call: _e.mock.On("kill")}
173}
174
175func (_c *mockworkerProcess_kill_Call) Run(run func()) *mockworkerProcess_kill_Call {
176	_c.Call.Run(func(args mock.Arguments) {
177		run()
178	})
179	return _c
180}
181
182func (_c *mockworkerProcess_kill_Call) Return(err error) *mockworkerProcess_kill_Call {
183	_c.Call.Return(err)
184	return _c
185}
186
187func (_c *mockworkerProcess_kill_Call) RunAndReturn(run func() error) *mockworkerProcess_kill_Call {
188	_c.Call.Return(run)
189	return _c
190}
191
192// pipes provides a mock function for the type mockworkerProcess
193func (_mock *mockworkerProcess) pipes() (io.WriteCloser, io.ReadCloser) {
194	ret := _mock.Called()
195
196	if len(ret) == 0 {
197		panic("no return value specified for pipes")
198	}
199
200	var r0 io.WriteCloser
201	var r1 io.ReadCloser
202	if returnFunc, ok := ret.Get(0).(func() (io.WriteCloser, io.ReadCloser)); ok {
203		return returnFunc()
204	}
205	if returnFunc, ok := ret.Get(0).(func() io.WriteCloser); ok {
206		r0 = returnFunc()
207	} else {
208		if ret.Get(0) != nil {
209			r0 = ret.Get(0).(io.WriteCloser)
210		}
211	}
212	if returnFunc, ok := ret.Get(1).(func() io.ReadCloser); ok {
213		r1 = returnFunc()
214	} else {
215		if ret.Get(1) != nil {
216			r1 = ret.Get(1).(io.ReadCloser)
217		}
218	}
219	return r0, r1
220}
221
222// mockworkerProcess_pipes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'pipes'
223type mockworkerProcess_pipes_Call struct {
224	*mock.Call
225}
226
227// pipes is a helper method to define mock.On call
228func (_e *mockworkerProcess_Expecter) pipes() *mockworkerProcess_pipes_Call {
229	return &mockworkerProcess_pipes_Call{Call: _e.mock.On("pipes")}
230}
231
232func (_c *mockworkerProcess_pipes_Call) Run(run func()) *mockworkerProcess_pipes_Call {
233	_c.Call.Run(func(args mock.Arguments) {
234		run()
235	})
236	return _c
237}
238
239func (_c *mockworkerProcess_pipes_Call) Return(stdin io.WriteCloser, stdout io.ReadCloser) *mockworkerProcess_pipes_Call {
240	_c.Call.Return(stdin, stdout)
241	return _c
242}
243
244func (_c *mockworkerProcess_pipes_Call) RunAndReturn(run func() (io.WriteCloser, io.ReadCloser)) *mockworkerProcess_pipes_Call {
245	_c.Call.Return(run)
246	return _c
247}
248
249// wait provides a mock function for the type mockworkerProcess
250func (_mock *mockworkerProcess) wait() error {
251	ret := _mock.Called()
252
253	if len(ret) == 0 {
254		panic("no return value specified for wait")
255	}
256
257	var r0 error
258	if returnFunc, ok := ret.Get(0).(func() error); ok {
259		r0 = returnFunc()
260	} else {
261		r0 = ret.Error(0)
262	}
263	return r0
264}
265
266// mockworkerProcess_wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'wait'
267type mockworkerProcess_wait_Call struct {
268	*mock.Call
269}
270
271// wait is a helper method to define mock.On call
272func (_e *mockworkerProcess_Expecter) wait() *mockworkerProcess_wait_Call {
273	return &mockworkerProcess_wait_Call{Call: _e.mock.On("wait")}
274}
275
276func (_c *mockworkerProcess_wait_Call) Run(run func()) *mockworkerProcess_wait_Call {
277	_c.Call.Run(func(args mock.Arguments) {
278		run()
279	})
280	return _c
281}
282
283func (_c *mockworkerProcess_wait_Call) Return(err error) *mockworkerProcess_wait_Call {
284	_c.Call.Return(err)
285	return _c
286}
287
288func (_c *mockworkerProcess_wait_Call) RunAndReturn(run func() error) *mockworkerProcess_wait_Call {
289	_c.Call.Return(run)
290	return _c
291}
292
293// newMockfadeRunner creates a new instance of mockfadeRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
294// The first argument is typically a *testing.T value.
295func newMockfadeRunner(t interface {
296	mock.TestingT
297	Cleanup(func())
298}) *mockfadeRunner {
299	if helper, ok := t.(interface{ Helper() }); ok {
300		helper.Helper()
301	}
302
303	mock := &mockfadeRunner{}
304	mock.Mock.Test(t)
305
306	t.Cleanup(func() {
307		if helper, ok := t.(interface{ Helper() }); ok {
308			helper.Helper()
309		}
310		mock.AssertExpectations(t)
311	})
312
313	return mock
314}
315
316// mockfadeRunner is an autogenerated mock type for the fadeRunner type
317type mockfadeRunner struct {
318	mock.Mock
319}
320
321type mockfadeRunner_Expecter struct {
322	mock *mock.Mock
323}
324
325func (_m *mockfadeRunner) EXPECT() *mockfadeRunner_Expecter {
326	return &mockfadeRunner_Expecter{mock: &_m.Mock}
327}
328
329// RunFade provides a mock function for the type mockfadeRunner
330func (_mock *mockfadeRunner) RunFade(ctx context.Context, m *fadeModel) error {
331	ret := _mock.Called(ctx, m)
332
333	if len(ret) == 0 {
334		panic("no return value specified for RunFade")
335	}
336
337	var r0 error
338	if returnFunc, ok := ret.Get(0).(func(context.Context, *fadeModel) error); ok {
339		r0 = returnFunc(ctx, m)
340	} else {
341		r0 = ret.Error(0)
342	}
343	return r0
344}
345
346// mockfadeRunner_RunFade_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunFade'
347type mockfadeRunner_RunFade_Call struct {
348	*mock.Call
349}
350
351// RunFade is a helper method to define mock.On call
352//   - ctx context.Context
353//   - m *fadeModel
354func (_e *mockfadeRunner_Expecter) RunFade(ctx any, m any) *mockfadeRunner_RunFade_Call {
355	return &mockfadeRunner_RunFade_Call{Call: _e.mock.On("RunFade", ctx, m)}
356}
357
358func (_c *mockfadeRunner_RunFade_Call) Run(run func(ctx context.Context, m *fadeModel)) *mockfadeRunner_RunFade_Call {
359	_c.Call.Run(func(args mock.Arguments) {
360		var arg0 context.Context
361		if args[0] != nil {
362			arg0 = args[0].(context.Context)
363		}
364		var arg1 *fadeModel
365		if args[1] != nil {
366			arg1 = args[1].(*fadeModel)
367		}
368		run(
369			arg0,
370			arg1,
371		)
372	})
373	return _c
374}
375
376func (_c *mockfadeRunner_RunFade_Call) Return(err error) *mockfadeRunner_RunFade_Call {
377	_c.Call.Return(err)
378	return _c
379}
380
381func (_c *mockfadeRunner_RunFade_Call) RunAndReturn(run func(ctx context.Context, m *fadeModel) error) *mockfadeRunner_RunFade_Call {
382	_c.Call.Return(run)
383	return _c
384}
385
386// newMocklockRunner creates a new instance of mocklockRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
387// The first argument is typically a *testing.T value.
388func newMocklockRunner(t interface {
389	mock.TestingT
390	Cleanup(func())
391}) *mocklockRunner {
392	if helper, ok := t.(interface{ Helper() }); ok {
393		helper.Helper()
394	}
395
396	mock := &mocklockRunner{}
397	mock.Mock.Test(t)
398
399	t.Cleanup(func() {
400		if helper, ok := t.(interface{ Helper() }); ok {
401			helper.Helper()
402		}
403		mock.AssertExpectations(t)
404	})
405
406	return mock
407}
408
409// mocklockRunner is an autogenerated mock type for the lockRunner type
410type mocklockRunner struct {
411	mock.Mock
412}
413
414type mocklockRunner_Expecter struct {
415	mock *mock.Mock
416}
417
418func (_m *mocklockRunner) EXPECT() *mocklockRunner_Expecter {
419	return &mocklockRunner_Expecter{mock: &_m.Mock}
420}
421
422// RunLock provides a mock function for the type mocklockRunner
423func (_mock *mocklockRunner) RunLock(ctx context.Context, cfg lockConfig) error {
424	ret := _mock.Called(ctx, cfg)
425
426	if len(ret) == 0 {
427		panic("no return value specified for RunLock")
428	}
429
430	var r0 error
431	if returnFunc, ok := ret.Get(0).(func(context.Context, lockConfig) error); ok {
432		r0 = returnFunc(ctx, cfg)
433	} else {
434		r0 = ret.Error(0)
435	}
436	return r0
437}
438
439// mocklockRunner_RunLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunLock'
440type mocklockRunner_RunLock_Call struct {
441	*mock.Call
442}
443
444// RunLock is a helper method to define mock.On call
445//   - ctx context.Context
446//   - cfg lockConfig
447func (_e *mocklockRunner_Expecter) RunLock(ctx any, cfg any) *mocklockRunner_RunLock_Call {
448	return &mocklockRunner_RunLock_Call{Call: _e.mock.On("RunLock", ctx, cfg)}
449}
450
451func (_c *mocklockRunner_RunLock_Call) Run(run func(ctx context.Context, cfg lockConfig)) *mocklockRunner_RunLock_Call {
452	_c.Call.Run(func(args mock.Arguments) {
453		var arg0 context.Context
454		if args[0] != nil {
455			arg0 = args[0].(context.Context)
456		}
457		var arg1 lockConfig
458		if args[1] != nil {
459			arg1 = args[1].(lockConfig)
460		}
461		run(
462			arg0,
463			arg1,
464		)
465	})
466	return _c
467}
468
469func (_c *mocklockRunner_RunLock_Call) Return(err error) *mocklockRunner_RunLock_Call {
470	_c.Call.Return(err)
471	return _c
472}
473
474func (_c *mocklockRunner_RunLock_Call) RunAndReturn(run func(ctx context.Context, cfg lockConfig) error) *mocklockRunner_RunLock_Call {
475	_c.Call.Return(run)
476	return _c
477}

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 2

Tags 9

↑↓ moveenter openesc close