main 5041353

config_migrator.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"github.com/bnema/dumber/internal/application/port"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockConfigMigrator creates a new instance of MockConfigMigrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func NewMockConfigMigrator(t interface {
15	mock.TestingT
16	Cleanup(func())
17}) *MockConfigMigrator {
18	mock := &MockConfigMigrator{}
19	mock.Mock.Test(t)
20
21	t.Cleanup(func() { mock.AssertExpectations(t) })
22
23	return mock
24}
25
26// MockConfigMigrator is an autogenerated mock type for the ConfigMigrator type
27type MockConfigMigrator struct {
28	mock.Mock
29}
30
31type MockConfigMigrator_Expecter struct {
32	mock *mock.Mock
33}
34
35func (_m *MockConfigMigrator) EXPECT() *MockConfigMigrator_Expecter {
36	return &MockConfigMigrator_Expecter{mock: &_m.Mock}
37}
38
39// CheckMigration provides a mock function for the type MockConfigMigrator
40func (_mock *MockConfigMigrator) CheckMigration() (*port.MigrationResult, error) {
41	ret := _mock.Called()
42
43	if len(ret) == 0 {
44		panic("no return value specified for CheckMigration")
45	}
46
47	var r0 *port.MigrationResult
48	var r1 error
49	if returnFunc, ok := ret.Get(0).(func() (*port.MigrationResult, error)); ok {
50		return returnFunc()
51	}
52	if returnFunc, ok := ret.Get(0).(func() *port.MigrationResult); ok {
53		r0 = returnFunc()
54	} else {
55		if ret.Get(0) != nil {
56			r0 = ret.Get(0).(*port.MigrationResult)
57		}
58	}
59	if returnFunc, ok := ret.Get(1).(func() error); ok {
60		r1 = returnFunc()
61	} else {
62		r1 = ret.Error(1)
63	}
64	return r0, r1
65}
66
67// MockConfigMigrator_CheckMigration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckMigration'
68type MockConfigMigrator_CheckMigration_Call struct {
69	*mock.Call
70}
71
72// CheckMigration is a helper method to define mock.On call
73func (_e *MockConfigMigrator_Expecter) CheckMigration() *MockConfigMigrator_CheckMigration_Call {
74	return &MockConfigMigrator_CheckMigration_Call{Call: _e.mock.On("CheckMigration")}
75}
76
77func (_c *MockConfigMigrator_CheckMigration_Call) Run(run func()) *MockConfigMigrator_CheckMigration_Call {
78	_c.Call.Run(func(args mock.Arguments) {
79		run()
80	})
81	return _c
82}
83
84func (_c *MockConfigMigrator_CheckMigration_Call) Return(migrationResult *port.MigrationResult, err error) *MockConfigMigrator_CheckMigration_Call {
85	_c.Call.Return(migrationResult, err)
86	return _c
87}
88
89func (_c *MockConfigMigrator_CheckMigration_Call) RunAndReturn(run func() (*port.MigrationResult, error)) *MockConfigMigrator_CheckMigration_Call {
90	_c.Call.Return(run)
91	return _c
92}
93
94// DetectChanges provides a mock function for the type MockConfigMigrator
95func (_mock *MockConfigMigrator) DetectChanges() ([]port.KeyChange, error) {
96	ret := _mock.Called()
97
98	if len(ret) == 0 {
99		panic("no return value specified for DetectChanges")
100	}
101
102	var r0 []port.KeyChange
103	var r1 error
104	if returnFunc, ok := ret.Get(0).(func() ([]port.KeyChange, error)); ok {
105		return returnFunc()
106	}
107	if returnFunc, ok := ret.Get(0).(func() []port.KeyChange); ok {
108		r0 = returnFunc()
109	} else {
110		if ret.Get(0) != nil {
111			r0 = ret.Get(0).([]port.KeyChange)
112		}
113	}
114	if returnFunc, ok := ret.Get(1).(func() error); ok {
115		r1 = returnFunc()
116	} else {
117		r1 = ret.Error(1)
118	}
119	return r0, r1
120}
121
122// MockConfigMigrator_DetectChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectChanges'
123type MockConfigMigrator_DetectChanges_Call struct {
124	*mock.Call
125}
126
127// DetectChanges is a helper method to define mock.On call
128func (_e *MockConfigMigrator_Expecter) DetectChanges() *MockConfigMigrator_DetectChanges_Call {
129	return &MockConfigMigrator_DetectChanges_Call{Call: _e.mock.On("DetectChanges")}
130}
131
132func (_c *MockConfigMigrator_DetectChanges_Call) Run(run func()) *MockConfigMigrator_DetectChanges_Call {
133	_c.Call.Run(func(args mock.Arguments) {
134		run()
135	})
136	return _c
137}
138
139func (_c *MockConfigMigrator_DetectChanges_Call) Return(keyChanges []port.KeyChange, err error) *MockConfigMigrator_DetectChanges_Call {
140	_c.Call.Return(keyChanges, err)
141	return _c
142}
143
144func (_c *MockConfigMigrator_DetectChanges_Call) RunAndReturn(run func() ([]port.KeyChange, error)) *MockConfigMigrator_DetectChanges_Call {
145	_c.Call.Return(run)
146	return _c
147}
148
149// GetConfigFile provides a mock function for the type MockConfigMigrator
150func (_mock *MockConfigMigrator) GetConfigFile() (string, error) {
151	ret := _mock.Called()
152
153	if len(ret) == 0 {
154		panic("no return value specified for GetConfigFile")
155	}
156
157	var r0 string
158	var r1 error
159	if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
160		return returnFunc()
161	}
162	if returnFunc, ok := ret.Get(0).(func() string); ok {
163		r0 = returnFunc()
164	} else {
165		r0 = ret.Get(0).(string)
166	}
167	if returnFunc, ok := ret.Get(1).(func() error); ok {
168		r1 = returnFunc()
169	} else {
170		r1 = ret.Error(1)
171	}
172	return r0, r1
173}
174
175// MockConfigMigrator_GetConfigFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfigFile'
176type MockConfigMigrator_GetConfigFile_Call struct {
177	*mock.Call
178}
179
180// GetConfigFile is a helper method to define mock.On call
181func (_e *MockConfigMigrator_Expecter) GetConfigFile() *MockConfigMigrator_GetConfigFile_Call {
182	return &MockConfigMigrator_GetConfigFile_Call{Call: _e.mock.On("GetConfigFile")}
183}
184
185func (_c *MockConfigMigrator_GetConfigFile_Call) Run(run func()) *MockConfigMigrator_GetConfigFile_Call {
186	_c.Call.Run(func(args mock.Arguments) {
187		run()
188	})
189	return _c
190}
191
192func (_c *MockConfigMigrator_GetConfigFile_Call) Return(s string, err error) *MockConfigMigrator_GetConfigFile_Call {
193	_c.Call.Return(s, err)
194	return _c
195}
196
197func (_c *MockConfigMigrator_GetConfigFile_Call) RunAndReturn(run func() (string, error)) *MockConfigMigrator_GetConfigFile_Call {
198	_c.Call.Return(run)
199	return _c
200}
201
202// GetKeyInfo provides a mock function for the type MockConfigMigrator
203func (_mock *MockConfigMigrator) GetKeyInfo(key string) port.KeyInfo {
204	ret := _mock.Called(key)
205
206	if len(ret) == 0 {
207		panic("no return value specified for GetKeyInfo")
208	}
209
210	var r0 port.KeyInfo
211	if returnFunc, ok := ret.Get(0).(func(string) port.KeyInfo); ok {
212		r0 = returnFunc(key)
213	} else {
214		r0 = ret.Get(0).(port.KeyInfo)
215	}
216	return r0
217}
218
219// MockConfigMigrator_GetKeyInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyInfo'
220type MockConfigMigrator_GetKeyInfo_Call struct {
221	*mock.Call
222}
223
224// GetKeyInfo is a helper method to define mock.On call
225//   - key string
226func (_e *MockConfigMigrator_Expecter) GetKeyInfo(key any) *MockConfigMigrator_GetKeyInfo_Call {
227	return &MockConfigMigrator_GetKeyInfo_Call{Call: _e.mock.On("GetKeyInfo", key)}
228}
229
230func (_c *MockConfigMigrator_GetKeyInfo_Call) Run(run func(key string)) *MockConfigMigrator_GetKeyInfo_Call {
231	_c.Call.Run(func(args mock.Arguments) {
232		var arg0 string
233		if args[0] != nil {
234			arg0 = args[0].(string)
235		}
236		run(
237			arg0,
238		)
239	})
240	return _c
241}
242
243func (_c *MockConfigMigrator_GetKeyInfo_Call) Return(keyInfo port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
244	_c.Call.Return(keyInfo)
245	return _c
246}
247
248func (_c *MockConfigMigrator_GetKeyInfo_Call) RunAndReturn(run func(key string) port.KeyInfo) *MockConfigMigrator_GetKeyInfo_Call {
249	_c.Call.Return(run)
250	return _c
251}
252
253// Migrate provides a mock function for the type MockConfigMigrator
254func (_mock *MockConfigMigrator) Migrate() ([]string, error) {
255	ret := _mock.Called()
256
257	if len(ret) == 0 {
258		panic("no return value specified for Migrate")
259	}
260
261	var r0 []string
262	var r1 error
263	if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok {
264		return returnFunc()
265	}
266	if returnFunc, ok := ret.Get(0).(func() []string); ok {
267		r0 = returnFunc()
268	} else {
269		if ret.Get(0) != nil {
270			r0 = ret.Get(0).([]string)
271		}
272	}
273	if returnFunc, ok := ret.Get(1).(func() error); ok {
274		r1 = returnFunc()
275	} else {
276		r1 = ret.Error(1)
277	}
278	return r0, r1
279}
280
281// MockConfigMigrator_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate'
282type MockConfigMigrator_Migrate_Call struct {
283	*mock.Call
284}
285
286// Migrate is a helper method to define mock.On call
287func (_e *MockConfigMigrator_Expecter) Migrate() *MockConfigMigrator_Migrate_Call {
288	return &MockConfigMigrator_Migrate_Call{Call: _e.mock.On("Migrate")}
289}
290
291func (_c *MockConfigMigrator_Migrate_Call) Run(run func()) *MockConfigMigrator_Migrate_Call {
292	_c.Call.Run(func(args mock.Arguments) {
293		run()
294	})
295	return _c
296}
297
298func (_c *MockConfigMigrator_Migrate_Call) Return(strings []string, err error) *MockConfigMigrator_Migrate_Call {
299	_c.Call.Return(strings, err)
300	return _c
301}
302
303func (_c *MockConfigMigrator_Migrate_Call) RunAndReturn(run func() ([]string, error)) *MockConfigMigrator_Migrate_Call {
304	_c.Call.Return(run)
305	return _c
306}
307
308// NewMockDiffFormatter creates a new instance of MockDiffFormatter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
309// The first argument is typically a *testing.T value.
310func NewMockDiffFormatter(t interface {
311	mock.TestingT
312	Cleanup(func())
313}) *MockDiffFormatter {
314	mock := &MockDiffFormatter{}
315	mock.Mock.Test(t)
316
317	t.Cleanup(func() { mock.AssertExpectations(t) })
318
319	return mock
320}
321
322// MockDiffFormatter is an autogenerated mock type for the DiffFormatter type
323type MockDiffFormatter struct {
324	mock.Mock
325}
326
327type MockDiffFormatter_Expecter struct {
328	mock *mock.Mock
329}
330
331func (_m *MockDiffFormatter) EXPECT() *MockDiffFormatter_Expecter {
332	return &MockDiffFormatter_Expecter{mock: &_m.Mock}
333}
334
335// FormatChangesAsDiff provides a mock function for the type MockDiffFormatter
336func (_mock *MockDiffFormatter) FormatChangesAsDiff(changes []port.KeyChange) string {
337	ret := _mock.Called(changes)
338
339	if len(ret) == 0 {
340		panic("no return value specified for FormatChangesAsDiff")
341	}
342
343	var r0 string
344	if returnFunc, ok := ret.Get(0).(func([]port.KeyChange) string); ok {
345		r0 = returnFunc(changes)
346	} else {
347		r0 = ret.Get(0).(string)
348	}
349	return r0
350}
351
352// MockDiffFormatter_FormatChangesAsDiff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FormatChangesAsDiff'
353type MockDiffFormatter_FormatChangesAsDiff_Call struct {
354	*mock.Call
355}
356
357// FormatChangesAsDiff is a helper method to define mock.On call
358//   - changes []port.KeyChange
359func (_e *MockDiffFormatter_Expecter) FormatChangesAsDiff(changes any) *MockDiffFormatter_FormatChangesAsDiff_Call {
360	return &MockDiffFormatter_FormatChangesAsDiff_Call{Call: _e.mock.On("FormatChangesAsDiff", changes)}
361}
362
363func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Run(run func(changes []port.KeyChange)) *MockDiffFormatter_FormatChangesAsDiff_Call {
364	_c.Call.Run(func(args mock.Arguments) {
365		var arg0 []port.KeyChange
366		if args[0] != nil {
367			arg0 = args[0].([]port.KeyChange)
368		}
369		run(
370			arg0,
371		)
372	})
373	return _c
374}
375
376func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) Return(s string) *MockDiffFormatter_FormatChangesAsDiff_Call {
377	_c.Call.Return(s)
378	return _c
379}
380
381func (_c *MockDiffFormatter_FormatChangesAsDiff_Call) RunAndReturn(run func(changes []port.KeyChange) string) *MockDiffFormatter_FormatChangesAsDiff_Call {
382	_c.Call.Return(run)
383	return _c
384}

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 8

Tags 42

↑↓ moveenter openesc close