v3.4.1 de8f68e

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

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 7

Tags 106

↑↓ moveenter openesc close