v0.3.0 99dc266

process_mock.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8	mock "github.com/stretchr/testify/mock"
9)
10
11// NewMockProcessInspector creates a new instance of MockProcessInspector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12// The first argument is typically a *testing.T value.
13func NewMockProcessInspector(t interface {
14	mock.TestingT
15	Cleanup(func())
16}) *MockProcessInspector {
17	mock := &MockProcessInspector{}
18	mock.Mock.Test(t)
19
20	t.Cleanup(func() { mock.AssertExpectations(t) })
21
22	return mock
23}
24
25// MockProcessInspector is an autogenerated mock type for the ProcessInspector type
26type MockProcessInspector struct {
27	mock.Mock
28}
29
30type MockProcessInspector_Expecter struct {
31	mock *mock.Mock
32}
33
34func (_m *MockProcessInspector) EXPECT() *MockProcessInspector_Expecter {
35	return &MockProcessInspector_Expecter{mock: &_m.Mock}
36}
37
38// Argv provides a mock function for the type MockProcessInspector
39func (_mock *MockProcessInspector) Argv(pid int) ([]string, error) {
40	ret := _mock.Called(pid)
41
42	if len(ret) == 0 {
43		panic("no return value specified for Argv")
44	}
45
46	var r0 []string
47	var r1 error
48	if returnFunc, ok := ret.Get(0).(func(int) ([]string, error)); ok {
49		return returnFunc(pid)
50	}
51	if returnFunc, ok := ret.Get(0).(func(int) []string); ok {
52		r0 = returnFunc(pid)
53	} else {
54		if ret.Get(0) != nil {
55			r0 = ret.Get(0).([]string)
56		}
57	}
58	if returnFunc, ok := ret.Get(1).(func(int) error); ok {
59		r1 = returnFunc(pid)
60	} else {
61		r1 = ret.Error(1)
62	}
63	return r0, r1
64}
65
66// MockProcessInspector_Argv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Argv'
67type MockProcessInspector_Argv_Call struct {
68	*mock.Call
69}
70
71// Argv is a helper method to define mock.On call
72//   - pid int
73func (_e *MockProcessInspector_Expecter) Argv(pid any) *MockProcessInspector_Argv_Call {
74	return &MockProcessInspector_Argv_Call{Call: _e.mock.On("Argv", pid)}
75}
76
77func (_c *MockProcessInspector_Argv_Call) Run(run func(pid int)) *MockProcessInspector_Argv_Call {
78	_c.Call.Run(func(args mock.Arguments) {
79		var arg0 int
80		if args[0] != nil {
81			arg0 = args[0].(int)
82		}
83		run(
84			arg0,
85		)
86	})
87	return _c
88}
89
90func (_c *MockProcessInspector_Argv_Call) Return(strings []string, err error) *MockProcessInspector_Argv_Call {
91	_c.Call.Return(strings, err)
92	return _c
93}
94
95func (_c *MockProcessInspector_Argv_Call) RunAndReturn(run func(pid int) ([]string, error)) *MockProcessInspector_Argv_Call {
96	_c.Call.Return(run)
97	return _c
98}
99
100// Comm provides a mock function for the type MockProcessInspector
101func (_mock *MockProcessInspector) Comm(pid int) (string, error) {
102	ret := _mock.Called(pid)
103
104	if len(ret) == 0 {
105		panic("no return value specified for Comm")
106	}
107
108	var r0 string
109	var r1 error
110	if returnFunc, ok := ret.Get(0).(func(int) (string, error)); ok {
111		return returnFunc(pid)
112	}
113	if returnFunc, ok := ret.Get(0).(func(int) string); ok {
114		r0 = returnFunc(pid)
115	} else {
116		r0 = ret.Get(0).(string)
117	}
118	if returnFunc, ok := ret.Get(1).(func(int) error); ok {
119		r1 = returnFunc(pid)
120	} else {
121		r1 = ret.Error(1)
122	}
123	return r0, r1
124}
125
126// MockProcessInspector_Comm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Comm'
127type MockProcessInspector_Comm_Call struct {
128	*mock.Call
129}
130
131// Comm is a helper method to define mock.On call
132//   - pid int
133func (_e *MockProcessInspector_Expecter) Comm(pid any) *MockProcessInspector_Comm_Call {
134	return &MockProcessInspector_Comm_Call{Call: _e.mock.On("Comm", pid)}
135}
136
137func (_c *MockProcessInspector_Comm_Call) Run(run func(pid int)) *MockProcessInspector_Comm_Call {
138	_c.Call.Run(func(args mock.Arguments) {
139		var arg0 int
140		if args[0] != nil {
141			arg0 = args[0].(int)
142		}
143		run(
144			arg0,
145		)
146	})
147	return _c
148}
149
150func (_c *MockProcessInspector_Comm_Call) Return(s string, err error) *MockProcessInspector_Comm_Call {
151	_c.Call.Return(s, err)
152	return _c
153}
154
155func (_c *MockProcessInspector_Comm_Call) RunAndReturn(run func(pid int) (string, error)) *MockProcessInspector_Comm_Call {
156	_c.Call.Return(run)
157	return _c
158}
159
160// Cwd provides a mock function for the type MockProcessInspector
161func (_mock *MockProcessInspector) Cwd(pid int) (string, error) {
162	ret := _mock.Called(pid)
163
164	if len(ret) == 0 {
165		panic("no return value specified for Cwd")
166	}
167
168	var r0 string
169	var r1 error
170	if returnFunc, ok := ret.Get(0).(func(int) (string, error)); ok {
171		return returnFunc(pid)
172	}
173	if returnFunc, ok := ret.Get(0).(func(int) string); ok {
174		r0 = returnFunc(pid)
175	} else {
176		r0 = ret.Get(0).(string)
177	}
178	if returnFunc, ok := ret.Get(1).(func(int) error); ok {
179		r1 = returnFunc(pid)
180	} else {
181		r1 = ret.Error(1)
182	}
183	return r0, r1
184}
185
186// MockProcessInspector_Cwd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cwd'
187type MockProcessInspector_Cwd_Call struct {
188	*mock.Call
189}
190
191// Cwd is a helper method to define mock.On call
192//   - pid int
193func (_e *MockProcessInspector_Expecter) Cwd(pid any) *MockProcessInspector_Cwd_Call {
194	return &MockProcessInspector_Cwd_Call{Call: _e.mock.On("Cwd", pid)}
195}
196
197func (_c *MockProcessInspector_Cwd_Call) Run(run func(pid int)) *MockProcessInspector_Cwd_Call {
198	_c.Call.Run(func(args mock.Arguments) {
199		var arg0 int
200		if args[0] != nil {
201			arg0 = args[0].(int)
202		}
203		run(
204			arg0,
205		)
206	})
207	return _c
208}
209
210func (_c *MockProcessInspector_Cwd_Call) Return(s string, err error) *MockProcessInspector_Cwd_Call {
211	_c.Call.Return(s, err)
212	return _c
213}
214
215func (_c *MockProcessInspector_Cwd_Call) RunAndReturn(run func(pid int) (string, error)) *MockProcessInspector_Cwd_Call {
216	_c.Call.Return(run)
217	return _c
218}
219
220// GroupArgv provides a mock function for the type MockProcessInspector
221func (_mock *MockProcessInspector) GroupArgv(pgid int, shellPid int) ([]string, error) {
222	ret := _mock.Called(pgid, shellPid)
223
224	if len(ret) == 0 {
225		panic("no return value specified for GroupArgv")
226	}
227
228	var r0 []string
229	var r1 error
230	if returnFunc, ok := ret.Get(0).(func(int, int) ([]string, error)); ok {
231		return returnFunc(pgid, shellPid)
232	}
233	if returnFunc, ok := ret.Get(0).(func(int, int) []string); ok {
234		r0 = returnFunc(pgid, shellPid)
235	} else {
236		if ret.Get(0) != nil {
237			r0 = ret.Get(0).([]string)
238		}
239	}
240	if returnFunc, ok := ret.Get(1).(func(int, int) error); ok {
241		r1 = returnFunc(pgid, shellPid)
242	} else {
243		r1 = ret.Error(1)
244	}
245	return r0, r1
246}
247
248// MockProcessInspector_GroupArgv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GroupArgv'
249type MockProcessInspector_GroupArgv_Call struct {
250	*mock.Call
251}
252
253// GroupArgv is a helper method to define mock.On call
254//   - pgid int
255//   - shellPid int
256func (_e *MockProcessInspector_Expecter) GroupArgv(pgid any, shellPid any) *MockProcessInspector_GroupArgv_Call {
257	return &MockProcessInspector_GroupArgv_Call{Call: _e.mock.On("GroupArgv", pgid, shellPid)}
258}
259
260func (_c *MockProcessInspector_GroupArgv_Call) Run(run func(pgid int, shellPid int)) *MockProcessInspector_GroupArgv_Call {
261	_c.Call.Run(func(args mock.Arguments) {
262		var arg0 int
263		if args[0] != nil {
264			arg0 = args[0].(int)
265		}
266		var arg1 int
267		if args[1] != nil {
268			arg1 = args[1].(int)
269		}
270		run(
271			arg0,
272			arg1,
273		)
274	})
275	return _c
276}
277
278func (_c *MockProcessInspector_GroupArgv_Call) Return(strings []string, err error) *MockProcessInspector_GroupArgv_Call {
279	_c.Call.Return(strings, err)
280	return _c
281}
282
283func (_c *MockProcessInspector_GroupArgv_Call) RunAndReturn(run func(pgid int, shellPid int) ([]string, error)) *MockProcessInspector_GroupArgv_Call {
284	_c.Call.Return(run)
285	return _c
286}

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 12

Tags 11

↑↓ moveenter openesc close