v2.31.0-dev4 f8fb41e

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

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 106

↑↓ moveenter openesc close