v0.2.0 13c6a90

kms_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package drm
6
7import (
8	"os"
9
10	"github.com/bnema/neferwl/internal/ports"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// newMockkms creates a new instance of mockkms. 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 newMockkms(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *mockkms {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &mockkms{}
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// mockkms is an autogenerated mock type for the kms type
38type mockkms struct {
39	mock.Mock
40}
41
42type mockkms_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *mockkms) EXPECT() *mockkms_Expecter {
47	return &mockkms_Expecter{mock: &_m.Mock}
48}
49
50// addFB provides a mock function for the type mockkms
51func (_mock *mockkms) addFB(b *ports.DMABuf, format uint32) (uint32, error) {
52	ret := _mock.Called(b, format)
53
54	if len(ret) == 0 {
55		panic("no return value specified for addFB")
56	}
57
58	var r0 uint32
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(*ports.DMABuf, uint32) (uint32, error)); ok {
61		return returnFunc(b, format)
62	}
63	if returnFunc, ok := ret.Get(0).(func(*ports.DMABuf, uint32) uint32); ok {
64		r0 = returnFunc(b, format)
65	} else {
66		r0 = ret.Get(0).(uint32)
67	}
68	if returnFunc, ok := ret.Get(1).(func(*ports.DMABuf, uint32) error); ok {
69		r1 = returnFunc(b, format)
70	} else {
71		r1 = ret.Error(1)
72	}
73	return r0, r1
74}
75
76// mockkms_addFB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'addFB'
77type mockkms_addFB_Call struct {
78	*mock.Call
79}
80
81// addFB is a helper method to define mock.On call
82//   - b *ports.DMABuf
83//   - format uint32
84func (_e *mockkms_Expecter) addFB(b any, format any) *mockkms_addFB_Call {
85	return &mockkms_addFB_Call{Call: _e.mock.On("addFB", b, format)}
86}
87
88func (_c *mockkms_addFB_Call) Run(run func(b *ports.DMABuf, format uint32)) *mockkms_addFB_Call {
89	_c.Call.Run(func(args mock.Arguments) {
90		var arg0 *ports.DMABuf
91		if args[0] != nil {
92			arg0 = args[0].(*ports.DMABuf)
93		}
94		var arg1 uint32
95		if args[1] != nil {
96			arg1 = args[1].(uint32)
97		}
98		run(
99			arg0,
100			arg1,
101		)
102	})
103	return _c
104}
105
106func (_c *mockkms_addFB_Call) Return(v uint32, err error) *mockkms_addFB_Call {
107	_c.Call.Return(v, err)
108	return _c
109}
110
111func (_c *mockkms_addFB_Call) RunAndReturn(run func(b *ports.DMABuf, format uint32) (uint32, error)) *mockkms_addFB_Call {
112	_c.Call.Return(run)
113	return _c
114}
115
116// commit provides a mock function for the type mockkms
117func (_mock *mockkms) commit(req *atomicReq, flags uint32, userData uint64) error {
118	ret := _mock.Called(req, flags, userData)
119
120	if len(ret) == 0 {
121		panic("no return value specified for commit")
122	}
123
124	var r0 error
125	if returnFunc, ok := ret.Get(0).(func(*atomicReq, uint32, uint64) error); ok {
126		r0 = returnFunc(req, flags, userData)
127	} else {
128		r0 = ret.Error(0)
129	}
130	return r0
131}
132
133// mockkms_commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'commit'
134type mockkms_commit_Call struct {
135	*mock.Call
136}
137
138// commit is a helper method to define mock.On call
139//   - req *atomicReq
140//   - flags uint32
141//   - userData uint64
142func (_e *mockkms_Expecter) commit(req any, flags any, userData any) *mockkms_commit_Call {
143	return &mockkms_commit_Call{Call: _e.mock.On("commit", req, flags, userData)}
144}
145
146func (_c *mockkms_commit_Call) Run(run func(req *atomicReq, flags uint32, userData uint64)) *mockkms_commit_Call {
147	_c.Call.Run(func(args mock.Arguments) {
148		var arg0 *atomicReq
149		if args[0] != nil {
150			arg0 = args[0].(*atomicReq)
151		}
152		var arg1 uint32
153		if args[1] != nil {
154			arg1 = args[1].(uint32)
155		}
156		var arg2 uint64
157		if args[2] != nil {
158			arg2 = args[2].(uint64)
159		}
160		run(
161			arg0,
162			arg1,
163			arg2,
164		)
165	})
166	return _c
167}
168
169func (_c *mockkms_commit_Call) Return(err error) *mockkms_commit_Call {
170	_c.Call.Return(err)
171	return _c
172}
173
174func (_c *mockkms_commit_Call) RunAndReturn(run func(req *atomicReq, flags uint32, userData uint64) error) *mockkms_commit_Call {
175	_c.Call.Return(run)
176	return _c
177}
178
179// connector provides a mock function for the type mockkms
180func (_mock *mockkms) connector(id uint32) (connector, error) {
181	ret := _mock.Called(id)
182
183	if len(ret) == 0 {
184		panic("no return value specified for connector")
185	}
186
187	var r0 connector
188	var r1 error
189	if returnFunc, ok := ret.Get(0).(func(uint32) (connector, error)); ok {
190		return returnFunc(id)
191	}
192	if returnFunc, ok := ret.Get(0).(func(uint32) connector); ok {
193		r0 = returnFunc(id)
194	} else {
195		r0 = ret.Get(0).(connector)
196	}
197	if returnFunc, ok := ret.Get(1).(func(uint32) error); ok {
198		r1 = returnFunc(id)
199	} else {
200		r1 = ret.Error(1)
201	}
202	return r0, r1
203}
204
205// mockkms_connector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'connector'
206type mockkms_connector_Call struct {
207	*mock.Call
208}
209
210// connector is a helper method to define mock.On call
211//   - id uint32
212func (_e *mockkms_Expecter) connector(id any) *mockkms_connector_Call {
213	return &mockkms_connector_Call{Call: _e.mock.On("connector", id)}
214}
215
216func (_c *mockkms_connector_Call) Run(run func(id uint32)) *mockkms_connector_Call {
217	_c.Call.Run(func(args mock.Arguments) {
218		var arg0 uint32
219		if args[0] != nil {
220			arg0 = args[0].(uint32)
221		}
222		run(
223			arg0,
224		)
225	})
226	return _c
227}
228
229func (_c *mockkms_connector_Call) Return(connectorMoqParam connector, err error) *mockkms_connector_Call {
230	_c.Call.Return(connectorMoqParam, err)
231	return _c
232}
233
234func (_c *mockkms_connector_Call) RunAndReturn(run func(id uint32) (connector, error)) *mockkms_connector_Call {
235	_c.Call.Return(run)
236	return _c
237}
238
239// createBlob provides a mock function for the type mockkms
240func (_mock *mockkms) createBlob(data []byte) (uint32, error) {
241	ret := _mock.Called(data)
242
243	if len(ret) == 0 {
244		panic("no return value specified for createBlob")
245	}
246
247	var r0 uint32
248	var r1 error
249	if returnFunc, ok := ret.Get(0).(func([]byte) (uint32, error)); ok {
250		return returnFunc(data)
251	}
252	if returnFunc, ok := ret.Get(0).(func([]byte) uint32); ok {
253		r0 = returnFunc(data)
254	} else {
255		r0 = ret.Get(0).(uint32)
256	}
257	if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
258		r1 = returnFunc(data)
259	} else {
260		r1 = ret.Error(1)
261	}
262	return r0, r1
263}
264
265// mockkms_createBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createBlob'
266type mockkms_createBlob_Call struct {
267	*mock.Call
268}
269
270// createBlob is a helper method to define mock.On call
271//   - data []byte
272func (_e *mockkms_Expecter) createBlob(data any) *mockkms_createBlob_Call {
273	return &mockkms_createBlob_Call{Call: _e.mock.On("createBlob", data)}
274}
275
276func (_c *mockkms_createBlob_Call) Run(run func(data []byte)) *mockkms_createBlob_Call {
277	_c.Call.Run(func(args mock.Arguments) {
278		var arg0 []byte
279		if args[0] != nil {
280			arg0 = args[0].([]byte)
281		}
282		run(
283			arg0,
284		)
285	})
286	return _c
287}
288
289func (_c *mockkms_createBlob_Call) Return(v uint32, err error) *mockkms_createBlob_Call {
290	_c.Call.Return(v, err)
291	return _c
292}
293
294func (_c *mockkms_createBlob_Call) RunAndReturn(run func(data []byte) (uint32, error)) *mockkms_createBlob_Call {
295	_c.Call.Return(run)
296	return _c
297}
298
299// createLease provides a mock function for the type mockkms
300func (_mock *mockkms) createLease(objects []uint32) (*os.File, uint32, error) {
301	ret := _mock.Called(objects)
302
303	if len(ret) == 0 {
304		panic("no return value specified for createLease")
305	}
306
307	var r0 *os.File
308	var r1 uint32
309	var r2 error
310	if returnFunc, ok := ret.Get(0).(func([]uint32) (*os.File, uint32, error)); ok {
311		return returnFunc(objects)
312	}
313	if returnFunc, ok := ret.Get(0).(func([]uint32) *os.File); ok {
314		r0 = returnFunc(objects)
315	} else {
316		if ret.Get(0) != nil {
317			r0 = ret.Get(0).(*os.File)
318		}
319	}
320	if returnFunc, ok := ret.Get(1).(func([]uint32) uint32); ok {
321		r1 = returnFunc(objects)
322	} else {
323		r1 = ret.Get(1).(uint32)
324	}
325	if returnFunc, ok := ret.Get(2).(func([]uint32) error); ok {
326		r2 = returnFunc(objects)
327	} else {
328		r2 = ret.Error(2)
329	}
330	return r0, r1, r2
331}
332
333// mockkms_createLease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createLease'
334type mockkms_createLease_Call struct {
335	*mock.Call
336}
337
338// createLease is a helper method to define mock.On call
339//   - objects []uint32
340func (_e *mockkms_Expecter) createLease(objects any) *mockkms_createLease_Call {
341	return &mockkms_createLease_Call{Call: _e.mock.On("createLease", objects)}
342}
343
344func (_c *mockkms_createLease_Call) Run(run func(objects []uint32)) *mockkms_createLease_Call {
345	_c.Call.Run(func(args mock.Arguments) {
346		var arg0 []uint32
347		if args[0] != nil {
348			arg0 = args[0].([]uint32)
349		}
350		run(
351			arg0,
352		)
353	})
354	return _c
355}
356
357func (_c *mockkms_createLease_Call) Return(file *os.File, v uint32, err error) *mockkms_createLease_Call {
358	_c.Call.Return(file, v, err)
359	return _c
360}
361
362func (_c *mockkms_createLease_Call) RunAndReturn(run func(objects []uint32) (*os.File, uint32, error)) *mockkms_createLease_Call {
363	_c.Call.Return(run)
364	return _c
365}
366
367// destroyBlob provides a mock function for the type mockkms
368func (_mock *mockkms) destroyBlob(id uint32) error {
369	ret := _mock.Called(id)
370
371	if len(ret) == 0 {
372		panic("no return value specified for destroyBlob")
373	}
374
375	var r0 error
376	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
377		r0 = returnFunc(id)
378	} else {
379		r0 = ret.Error(0)
380	}
381	return r0
382}
383
384// mockkms_destroyBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'destroyBlob'
385type mockkms_destroyBlob_Call struct {
386	*mock.Call
387}
388
389// destroyBlob is a helper method to define mock.On call
390//   - id uint32
391func (_e *mockkms_Expecter) destroyBlob(id any) *mockkms_destroyBlob_Call {
392	return &mockkms_destroyBlob_Call{Call: _e.mock.On("destroyBlob", id)}
393}
394
395func (_c *mockkms_destroyBlob_Call) Run(run func(id uint32)) *mockkms_destroyBlob_Call {
396	_c.Call.Run(func(args mock.Arguments) {
397		var arg0 uint32
398		if args[0] != nil {
399			arg0 = args[0].(uint32)
400		}
401		run(
402			arg0,
403		)
404	})
405	return _c
406}
407
408func (_c *mockkms_destroyBlob_Call) Return(err error) *mockkms_destroyBlob_Call {
409	_c.Call.Return(err)
410	return _c
411}
412
413func (_c *mockkms_destroyBlob_Call) RunAndReturn(run func(id uint32) error) *mockkms_destroyBlob_Call {
414	_c.Call.Return(run)
415	return _c
416}
417
418// getBlob provides a mock function for the type mockkms
419func (_mock *mockkms) getBlob(id uint32) ([]byte, error) {
420	ret := _mock.Called(id)
421
422	if len(ret) == 0 {
423		panic("no return value specified for getBlob")
424	}
425
426	var r0 []byte
427	var r1 error
428	if returnFunc, ok := ret.Get(0).(func(uint32) ([]byte, error)); ok {
429		return returnFunc(id)
430	}
431	if returnFunc, ok := ret.Get(0).(func(uint32) []byte); ok {
432		r0 = returnFunc(id)
433	} else {
434		if ret.Get(0) != nil {
435			r0 = ret.Get(0).([]byte)
436		}
437	}
438	if returnFunc, ok := ret.Get(1).(func(uint32) error); ok {
439		r1 = returnFunc(id)
440	} else {
441		r1 = ret.Error(1)
442	}
443	return r0, r1
444}
445
446// mockkms_getBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getBlob'
447type mockkms_getBlob_Call struct {
448	*mock.Call
449}
450
451// getBlob is a helper method to define mock.On call
452//   - id uint32
453func (_e *mockkms_Expecter) getBlob(id any) *mockkms_getBlob_Call {
454	return &mockkms_getBlob_Call{Call: _e.mock.On("getBlob", id)}
455}
456
457func (_c *mockkms_getBlob_Call) Run(run func(id uint32)) *mockkms_getBlob_Call {
458	_c.Call.Run(func(args mock.Arguments) {
459		var arg0 uint32
460		if args[0] != nil {
461			arg0 = args[0].(uint32)
462		}
463		run(
464			arg0,
465		)
466	})
467	return _c
468}
469
470func (_c *mockkms_getBlob_Call) Return(bytes []byte, err error) *mockkms_getBlob_Call {
471	_c.Call.Return(bytes, err)
472	return _c
473}
474
475func (_c *mockkms_getBlob_Call) RunAndReturn(run func(id uint32) ([]byte, error)) *mockkms_getBlob_Call {
476	_c.Call.Return(run)
477	return _c
478}
479
480// objProps provides a mock function for the type mockkms
481func (_mock *mockkms) objProps(obj uint32, typ uint32) (map[string][2]uint64, error) {
482	ret := _mock.Called(obj, typ)
483
484	if len(ret) == 0 {
485		panic("no return value specified for objProps")
486	}
487
488	var r0 map[string][2]uint64
489	var r1 error
490	if returnFunc, ok := ret.Get(0).(func(uint32, uint32) (map[string][2]uint64, error)); ok {
491		return returnFunc(obj, typ)
492	}
493	if returnFunc, ok := ret.Get(0).(func(uint32, uint32) map[string][2]uint64); ok {
494		r0 = returnFunc(obj, typ)
495	} else {
496		if ret.Get(0) != nil {
497			r0 = ret.Get(0).(map[string][2]uint64)
498		}
499	}
500	if returnFunc, ok := ret.Get(1).(func(uint32, uint32) error); ok {
501		r1 = returnFunc(obj, typ)
502	} else {
503		r1 = ret.Error(1)
504	}
505	return r0, r1
506}
507
508// mockkms_objProps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'objProps'
509type mockkms_objProps_Call struct {
510	*mock.Call
511}
512
513// objProps is a helper method to define mock.On call
514//   - obj uint32
515//   - typ uint32
516func (_e *mockkms_Expecter) objProps(obj any, typ any) *mockkms_objProps_Call {
517	return &mockkms_objProps_Call{Call: _e.mock.On("objProps", obj, typ)}
518}
519
520func (_c *mockkms_objProps_Call) Run(run func(obj uint32, typ uint32)) *mockkms_objProps_Call {
521	_c.Call.Run(func(args mock.Arguments) {
522		var arg0 uint32
523		if args[0] != nil {
524			arg0 = args[0].(uint32)
525		}
526		var arg1 uint32
527		if args[1] != nil {
528			arg1 = args[1].(uint32)
529		}
530		run(
531			arg0,
532			arg1,
533		)
534	})
535	return _c
536}
537
538func (_c *mockkms_objProps_Call) Return(stringToUint64s map[string][2]uint64, err error) *mockkms_objProps_Call {
539	_c.Call.Return(stringToUint64s, err)
540	return _c
541}
542
543func (_c *mockkms_objProps_Call) RunAndReturn(run func(obj uint32, typ uint32) (map[string][2]uint64, error)) *mockkms_objProps_Call {
544	_c.Call.Return(run)
545	return _c
546}
547
548// pickCrtc provides a mock function for the type mockkms
549func (_mock *mockkms) pickCrtc(c connector, crtcs []uint32, used map[uint32]bool) (uint32, error) {
550	ret := _mock.Called(c, crtcs, used)
551
552	if len(ret) == 0 {
553		panic("no return value specified for pickCrtc")
554	}
555
556	var r0 uint32
557	var r1 error
558	if returnFunc, ok := ret.Get(0).(func(connector, []uint32, map[uint32]bool) (uint32, error)); ok {
559		return returnFunc(c, crtcs, used)
560	}
561	if returnFunc, ok := ret.Get(0).(func(connector, []uint32, map[uint32]bool) uint32); ok {
562		r0 = returnFunc(c, crtcs, used)
563	} else {
564		r0 = ret.Get(0).(uint32)
565	}
566	if returnFunc, ok := ret.Get(1).(func(connector, []uint32, map[uint32]bool) error); ok {
567		r1 = returnFunc(c, crtcs, used)
568	} else {
569		r1 = ret.Error(1)
570	}
571	return r0, r1
572}
573
574// mockkms_pickCrtc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'pickCrtc'
575type mockkms_pickCrtc_Call struct {
576	*mock.Call
577}
578
579// pickCrtc is a helper method to define mock.On call
580//   - c connector
581//   - crtcs []uint32
582//   - used map[uint32]bool
583func (_e *mockkms_Expecter) pickCrtc(c any, crtcs any, used any) *mockkms_pickCrtc_Call {
584	return &mockkms_pickCrtc_Call{Call: _e.mock.On("pickCrtc", c, crtcs, used)}
585}
586
587func (_c *mockkms_pickCrtc_Call) Run(run func(c connector, crtcs []uint32, used map[uint32]bool)) *mockkms_pickCrtc_Call {
588	_c.Call.Run(func(args mock.Arguments) {
589		var arg0 connector
590		if args[0] != nil {
591			arg0 = args[0].(connector)
592		}
593		var arg1 []uint32
594		if args[1] != nil {
595			arg1 = args[1].([]uint32)
596		}
597		var arg2 map[uint32]bool
598		if args[2] != nil {
599			arg2 = args[2].(map[uint32]bool)
600		}
601		run(
602			arg0,
603			arg1,
604			arg2,
605		)
606	})
607	return _c
608}
609
610func (_c *mockkms_pickCrtc_Call) Return(v uint32, err error) *mockkms_pickCrtc_Call {
611	_c.Call.Return(v, err)
612	return _c
613}
614
615func (_c *mockkms_pickCrtc_Call) RunAndReturn(run func(c connector, crtcs []uint32, used map[uint32]bool) (uint32, error)) *mockkms_pickCrtc_Call {
616	_c.Call.Return(run)
617	return _c
618}
619
620// planes provides a mock function for the type mockkms
621func (_mock *mockkms) planes() ([]planeRes, error) {
622	ret := _mock.Called()
623
624	if len(ret) == 0 {
625		panic("no return value specified for planes")
626	}
627
628	var r0 []planeRes
629	var r1 error
630	if returnFunc, ok := ret.Get(0).(func() ([]planeRes, error)); ok {
631		return returnFunc()
632	}
633	if returnFunc, ok := ret.Get(0).(func() []planeRes); ok {
634		r0 = returnFunc()
635	} else {
636		if ret.Get(0) != nil {
637			r0 = ret.Get(0).([]planeRes)
638		}
639	}
640	if returnFunc, ok := ret.Get(1).(func() error); ok {
641		r1 = returnFunc()
642	} else {
643		r1 = ret.Error(1)
644	}
645	return r0, r1
646}
647
648// mockkms_planes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'planes'
649type mockkms_planes_Call struct {
650	*mock.Call
651}
652
653// planes is a helper method to define mock.On call
654func (_e *mockkms_Expecter) planes() *mockkms_planes_Call {
655	return &mockkms_planes_Call{Call: _e.mock.On("planes")}
656}
657
658func (_c *mockkms_planes_Call) Run(run func()) *mockkms_planes_Call {
659	_c.Call.Run(func(args mock.Arguments) {
660		run()
661	})
662	return _c
663}
664
665func (_c *mockkms_planes_Call) Return(planeResMoqParams []planeRes, err error) *mockkms_planes_Call {
666	_c.Call.Return(planeResMoqParams, err)
667	return _c
668}
669
670func (_c *mockkms_planes_Call) RunAndReturn(run func() ([]planeRes, error)) *mockkms_planes_Call {
671	_c.Call.Return(run)
672	return _c
673}
674
675// resources provides a mock function for the type mockkms
676func (_mock *mockkms) resources() ([]uint32, []uint32, error) {
677	ret := _mock.Called()
678
679	if len(ret) == 0 {
680		panic("no return value specified for resources")
681	}
682
683	var r0 []uint32
684	var r1 []uint32
685	var r2 error
686	if returnFunc, ok := ret.Get(0).(func() ([]uint32, []uint32, error)); ok {
687		return returnFunc()
688	}
689	if returnFunc, ok := ret.Get(0).(func() []uint32); ok {
690		r0 = returnFunc()
691	} else {
692		if ret.Get(0) != nil {
693			r0 = ret.Get(0).([]uint32)
694		}
695	}
696	if returnFunc, ok := ret.Get(1).(func() []uint32); ok {
697		r1 = returnFunc()
698	} else {
699		if ret.Get(1) != nil {
700			r1 = ret.Get(1).([]uint32)
701		}
702	}
703	if returnFunc, ok := ret.Get(2).(func() error); ok {
704		r2 = returnFunc()
705	} else {
706		r2 = ret.Error(2)
707	}
708	return r0, r1, r2
709}
710
711// mockkms_resources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'resources'
712type mockkms_resources_Call struct {
713	*mock.Call
714}
715
716// resources is a helper method to define mock.On call
717func (_e *mockkms_Expecter) resources() *mockkms_resources_Call {
718	return &mockkms_resources_Call{Call: _e.mock.On("resources")}
719}
720
721func (_c *mockkms_resources_Call) Run(run func()) *mockkms_resources_Call {
722	_c.Call.Run(func(args mock.Arguments) {
723		run()
724	})
725	return _c
726}
727
728func (_c *mockkms_resources_Call) Return(uint32s []uint32, uint32s1 []uint32, err error) *mockkms_resources_Call {
729	_c.Call.Return(uint32s, uint32s1, err)
730	return _c
731}
732
733func (_c *mockkms_resources_Call) RunAndReturn(run func() ([]uint32, []uint32, error)) *mockkms_resources_Call {
734	_c.Call.Return(run)
735	return _c
736}
737
738// revokeLease provides a mock function for the type mockkms
739func (_mock *mockkms) revokeLease(id uint32) error {
740	ret := _mock.Called(id)
741
742	if len(ret) == 0 {
743		panic("no return value specified for revokeLease")
744	}
745
746	var r0 error
747	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
748		r0 = returnFunc(id)
749	} else {
750		r0 = ret.Error(0)
751	}
752	return r0
753}
754
755// mockkms_revokeLease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'revokeLease'
756type mockkms_revokeLease_Call struct {
757	*mock.Call
758}
759
760// revokeLease is a helper method to define mock.On call
761//   - id uint32
762func (_e *mockkms_Expecter) revokeLease(id any) *mockkms_revokeLease_Call {
763	return &mockkms_revokeLease_Call{Call: _e.mock.On("revokeLease", id)}
764}
765
766func (_c *mockkms_revokeLease_Call) Run(run func(id uint32)) *mockkms_revokeLease_Call {
767	_c.Call.Run(func(args mock.Arguments) {
768		var arg0 uint32
769		if args[0] != nil {
770			arg0 = args[0].(uint32)
771		}
772		run(
773			arg0,
774		)
775	})
776	return _c
777}
778
779func (_c *mockkms_revokeLease_Call) Return(err error) *mockkms_revokeLease_Call {
780	_c.Call.Return(err)
781	return _c
782}
783
784func (_c *mockkms_revokeLease_Call) RunAndReturn(run func(id uint32) error) *mockkms_revokeLease_Call {
785	_c.Call.Return(run)
786	return _c
787}
788
789// rmFB provides a mock function for the type mockkms
790func (_mock *mockkms) rmFB(id uint32) error {
791	ret := _mock.Called(id)
792
793	if len(ret) == 0 {
794		panic("no return value specified for rmFB")
795	}
796
797	var r0 error
798	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
799		r0 = returnFunc(id)
800	} else {
801		r0 = ret.Error(0)
802	}
803	return r0
804}
805
806// mockkms_rmFB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'rmFB'
807type mockkms_rmFB_Call struct {
808	*mock.Call
809}
810
811// rmFB is a helper method to define mock.On call
812//   - id uint32
813func (_e *mockkms_Expecter) rmFB(id any) *mockkms_rmFB_Call {
814	return &mockkms_rmFB_Call{Call: _e.mock.On("rmFB", id)}
815}
816
817func (_c *mockkms_rmFB_Call) Run(run func(id uint32)) *mockkms_rmFB_Call {
818	_c.Call.Run(func(args mock.Arguments) {
819		var arg0 uint32
820		if args[0] != nil {
821			arg0 = args[0].(uint32)
822		}
823		run(
824			arg0,
825		)
826	})
827	return _c
828}
829
830func (_c *mockkms_rmFB_Call) Return(err error) *mockkms_rmFB_Call {
831	_c.Call.Return(err)
832	return _c
833}
834
835func (_c *mockkms_rmFB_Call) RunAndReturn(run func(id uint32) error) *mockkms_rmFB_Call {
836	_c.Call.Return(run)
837	return _c
838}

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 25

Tags 10

↑↓ moveenter openesc close