-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_mock_test.go
440 lines (379 loc) · 17.3 KB
/
client_mock_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/thediveo/morbyd/moby (interfaces: Client)
//
// Generated by this command:
//
// mockgen -destination client_mock_test.go -package morbyd github.com/thediveo/morbyd/moby Client
//
// Package morbyd is a generated GoMock package.
package morbyd
import (
context "context"
io "io"
reflect "reflect"
types "github.com/docker/docker/api/types"
container "github.com/docker/docker/api/types/container"
image "github.com/docker/docker/api/types/image"
network "github.com/docker/docker/api/types/network"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
gomock "go.uber.org/mock/gomock"
)
// MockClient is a mock of Client interface.
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
}
// MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
mock *MockClient
}
// NewMockClient creates a new mock instance.
func NewMockClient(ctrl *gomock.Controller) *MockClient {
mock := &MockClient{ctrl: ctrl}
mock.recorder = &MockClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockClient) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockClientMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClient)(nil).Close))
}
// ContainerAttach mocks base method.
func (m *MockClient) ContainerAttach(arg0 context.Context, arg1 string, arg2 container.AttachOptions) (types.HijackedResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerAttach", arg0, arg1, arg2)
ret0, _ := ret[0].(types.HijackedResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerAttach indicates an expected call of ContainerAttach.
func (mr *MockClientMockRecorder) ContainerAttach(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerAttach", reflect.TypeOf((*MockClient)(nil).ContainerAttach), arg0, arg1, arg2)
}
// ContainerCreate mocks base method.
func (m *MockClient) ContainerCreate(arg0 context.Context, arg1 *container.Config, arg2 *container.HostConfig, arg3 *network.NetworkingConfig, arg4 *v1.Platform, arg5 string) (container.CreateResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerCreate", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(container.CreateResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerCreate indicates an expected call of ContainerCreate.
func (mr *MockClientMockRecorder) ContainerCreate(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerCreate", reflect.TypeOf((*MockClient)(nil).ContainerCreate), arg0, arg1, arg2, arg3, arg4, arg5)
}
// ContainerExecAttach mocks base method.
func (m *MockClient) ContainerExecAttach(arg0 context.Context, arg1 string, arg2 container.ExecStartOptions) (types.HijackedResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerExecAttach", arg0, arg1, arg2)
ret0, _ := ret[0].(types.HijackedResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerExecAttach indicates an expected call of ContainerExecAttach.
func (mr *MockClientMockRecorder) ContainerExecAttach(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerExecAttach", reflect.TypeOf((*MockClient)(nil).ContainerExecAttach), arg0, arg1, arg2)
}
// ContainerExecCreate mocks base method.
func (m *MockClient) ContainerExecCreate(arg0 context.Context, arg1 string, arg2 container.ExecOptions) (types.IDResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerExecCreate", arg0, arg1, arg2)
ret0, _ := ret[0].(types.IDResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerExecCreate indicates an expected call of ContainerExecCreate.
func (mr *MockClientMockRecorder) ContainerExecCreate(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerExecCreate", reflect.TypeOf((*MockClient)(nil).ContainerExecCreate), arg0, arg1, arg2)
}
// ContainerExecInspect mocks base method.
func (m *MockClient) ContainerExecInspect(arg0 context.Context, arg1 string) (container.ExecInspect, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerExecInspect", arg0, arg1)
ret0, _ := ret[0].(container.ExecInspect)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerExecInspect indicates an expected call of ContainerExecInspect.
func (mr *MockClientMockRecorder) ContainerExecInspect(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerExecInspect", reflect.TypeOf((*MockClient)(nil).ContainerExecInspect), arg0, arg1)
}
// ContainerExecStart mocks base method.
func (m *MockClient) ContainerExecStart(arg0 context.Context, arg1 string, arg2 container.ExecStartOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerExecStart", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerExecStart indicates an expected call of ContainerExecStart.
func (mr *MockClientMockRecorder) ContainerExecStart(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerExecStart", reflect.TypeOf((*MockClient)(nil).ContainerExecStart), arg0, arg1, arg2)
}
// ContainerInspect mocks base method.
func (m *MockClient) ContainerInspect(arg0 context.Context, arg1 string) (types.ContainerJSON, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerInspect", arg0, arg1)
ret0, _ := ret[0].(types.ContainerJSON)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerInspect indicates an expected call of ContainerInspect.
func (mr *MockClientMockRecorder) ContainerInspect(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerInspect", reflect.TypeOf((*MockClient)(nil).ContainerInspect), arg0, arg1)
}
// ContainerKill mocks base method.
func (m *MockClient) ContainerKill(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerKill", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerKill indicates an expected call of ContainerKill.
func (mr *MockClientMockRecorder) ContainerKill(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerKill", reflect.TypeOf((*MockClient)(nil).ContainerKill), arg0, arg1, arg2)
}
// ContainerList mocks base method.
func (m *MockClient) ContainerList(arg0 context.Context, arg1 container.ListOptions) ([]types.Container, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerList", arg0, arg1)
ret0, _ := ret[0].([]types.Container)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ContainerList indicates an expected call of ContainerList.
func (mr *MockClientMockRecorder) ContainerList(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerList", reflect.TypeOf((*MockClient)(nil).ContainerList), arg0, arg1)
}
// ContainerPause mocks base method.
func (m *MockClient) ContainerPause(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerPause", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerPause indicates an expected call of ContainerPause.
func (mr *MockClientMockRecorder) ContainerPause(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerPause", reflect.TypeOf((*MockClient)(nil).ContainerPause), arg0, arg1)
}
// ContainerRemove mocks base method.
func (m *MockClient) ContainerRemove(arg0 context.Context, arg1 string, arg2 container.RemoveOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerRemove", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerRemove indicates an expected call of ContainerRemove.
func (mr *MockClientMockRecorder) ContainerRemove(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerRemove", reflect.TypeOf((*MockClient)(nil).ContainerRemove), arg0, arg1, arg2)
}
// ContainerRestart mocks base method.
func (m *MockClient) ContainerRestart(arg0 context.Context, arg1 string, arg2 container.StopOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerRestart", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerRestart indicates an expected call of ContainerRestart.
func (mr *MockClientMockRecorder) ContainerRestart(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerRestart", reflect.TypeOf((*MockClient)(nil).ContainerRestart), arg0, arg1, arg2)
}
// ContainerStart mocks base method.
func (m *MockClient) ContainerStart(arg0 context.Context, arg1 string, arg2 container.StartOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerStart", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerStart indicates an expected call of ContainerStart.
func (mr *MockClientMockRecorder) ContainerStart(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerStart", reflect.TypeOf((*MockClient)(nil).ContainerStart), arg0, arg1, arg2)
}
// ContainerStop mocks base method.
func (m *MockClient) ContainerStop(arg0 context.Context, arg1 string, arg2 container.StopOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerStop", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerStop indicates an expected call of ContainerStop.
func (mr *MockClientMockRecorder) ContainerStop(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerStop", reflect.TypeOf((*MockClient)(nil).ContainerStop), arg0, arg1, arg2)
}
// ContainerUnpause mocks base method.
func (m *MockClient) ContainerUnpause(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerUnpause", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ContainerUnpause indicates an expected call of ContainerUnpause.
func (mr *MockClientMockRecorder) ContainerUnpause(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerUnpause", reflect.TypeOf((*MockClient)(nil).ContainerUnpause), arg0, arg1)
}
// ContainerWait mocks base method.
func (m *MockClient) ContainerWait(arg0 context.Context, arg1 string, arg2 container.WaitCondition) (<-chan container.WaitResponse, <-chan error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerWait", arg0, arg1, arg2)
ret0, _ := ret[0].(<-chan container.WaitResponse)
ret1, _ := ret[1].(<-chan error)
return ret0, ret1
}
// ContainerWait indicates an expected call of ContainerWait.
func (mr *MockClientMockRecorder) ContainerWait(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerWait", reflect.TypeOf((*MockClient)(nil).ContainerWait), arg0, arg1, arg2)
}
// ImageBuild mocks base method.
func (m *MockClient) ImageBuild(arg0 context.Context, arg1 io.Reader, arg2 types.ImageBuildOptions) (types.ImageBuildResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageBuild", arg0, arg1, arg2)
ret0, _ := ret[0].(types.ImageBuildResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImageBuild indicates an expected call of ImageBuild.
func (mr *MockClientMockRecorder) ImageBuild(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageBuild", reflect.TypeOf((*MockClient)(nil).ImageBuild), arg0, arg1, arg2)
}
// ImageList mocks base method.
func (m *MockClient) ImageList(arg0 context.Context, arg1 image.ListOptions) ([]image.Summary, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageList", arg0, arg1)
ret0, _ := ret[0].([]image.Summary)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImageList indicates an expected call of ImageList.
func (mr *MockClientMockRecorder) ImageList(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageList", reflect.TypeOf((*MockClient)(nil).ImageList), arg0, arg1)
}
// ImagePull mocks base method.
func (m *MockClient) ImagePull(arg0 context.Context, arg1 string, arg2 image.PullOptions) (io.ReadCloser, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImagePull", arg0, arg1, arg2)
ret0, _ := ret[0].(io.ReadCloser)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImagePull indicates an expected call of ImagePull.
func (mr *MockClientMockRecorder) ImagePull(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImagePull", reflect.TypeOf((*MockClient)(nil).ImagePull), arg0, arg1, arg2)
}
// ImageRemove mocks base method.
func (m *MockClient) ImageRemove(arg0 context.Context, arg1 string, arg2 image.RemoveOptions) ([]image.DeleteResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageRemove", arg0, arg1, arg2)
ret0, _ := ret[0].([]image.DeleteResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImageRemove indicates an expected call of ImageRemove.
func (mr *MockClientMockRecorder) ImageRemove(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageRemove", reflect.TypeOf((*MockClient)(nil).ImageRemove), arg0, arg1, arg2)
}
// ImageTag mocks base method.
func (m *MockClient) ImageTag(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageTag", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ImageTag indicates an expected call of ImageTag.
func (mr *MockClientMockRecorder) ImageTag(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageTag", reflect.TypeOf((*MockClient)(nil).ImageTag), arg0, arg1, arg2)
}
// NetworkCreate mocks base method.
func (m *MockClient) NetworkCreate(arg0 context.Context, arg1 string, arg2 network.CreateOptions) (network.CreateResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetworkCreate", arg0, arg1, arg2)
ret0, _ := ret[0].(network.CreateResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetworkCreate indicates an expected call of NetworkCreate.
func (mr *MockClientMockRecorder) NetworkCreate(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkCreate", reflect.TypeOf((*MockClient)(nil).NetworkCreate), arg0, arg1, arg2)
}
// NetworkInspect mocks base method.
func (m *MockClient) NetworkInspect(arg0 context.Context, arg1 string, arg2 network.InspectOptions) (network.Inspect, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetworkInspect", arg0, arg1, arg2)
ret0, _ := ret[0].(network.Inspect)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetworkInspect indicates an expected call of NetworkInspect.
func (mr *MockClientMockRecorder) NetworkInspect(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkInspect", reflect.TypeOf((*MockClient)(nil).NetworkInspect), arg0, arg1, arg2)
}
// NetworkList mocks base method.
func (m *MockClient) NetworkList(arg0 context.Context, arg1 network.ListOptions) ([]network.Inspect, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetworkList", arg0, arg1)
ret0, _ := ret[0].([]network.Inspect)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetworkList indicates an expected call of NetworkList.
func (mr *MockClientMockRecorder) NetworkList(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkList", reflect.TypeOf((*MockClient)(nil).NetworkList), arg0, arg1)
}
// NetworkRemove mocks base method.
func (m *MockClient) NetworkRemove(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetworkRemove", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// NetworkRemove indicates an expected call of NetworkRemove.
func (mr *MockClientMockRecorder) NetworkRemove(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetworkRemove", reflect.TypeOf((*MockClient)(nil).NetworkRemove), arg0, arg1)
}
// ServerVersion mocks base method.
func (m *MockClient) ServerVersion(arg0 context.Context) (types.Version, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerVersion", arg0)
ret0, _ := ret[0].(types.Version)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ServerVersion indicates an expected call of ServerVersion.
func (mr *MockClientMockRecorder) ServerVersion(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerVersion", reflect.TypeOf((*MockClient)(nil).ServerVersion), arg0)
}