forked from kubernetes/kubernetes
/
runtime_mock.go
628 lines (535 loc) · 23.6 KB
/
runtime_mock.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
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT.
// Source: runtime.go
// Package testing is a generated GoMock package.
package testing
import (
context "context"
io "io"
url "net/url"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
v1 "k8s.io/api/core/v1"
types "k8s.io/apimachinery/pkg/types"
remotecommand "k8s.io/client-go/tools/remotecommand"
flowcontrol "k8s.io/client-go/util/flowcontrol"
v10 "k8s.io/cri-api/pkg/apis/runtime/v1"
container "k8s.io/kubernetes/pkg/kubelet/container"
)
// MockVersion is a mock of Version interface.
type MockVersion struct {
ctrl *gomock.Controller
recorder *MockVersionMockRecorder
}
// MockVersionMockRecorder is the mock recorder for MockVersion.
type MockVersionMockRecorder struct {
mock *MockVersion
}
// NewMockVersion creates a new mock instance.
func NewMockVersion(ctrl *gomock.Controller) *MockVersion {
mock := &MockVersion{ctrl: ctrl}
mock.recorder = &MockVersionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockVersion) EXPECT() *MockVersionMockRecorder {
return m.recorder
}
// Compare mocks base method.
func (m *MockVersion) Compare(other string) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Compare", other)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Compare indicates an expected call of Compare.
func (mr *MockVersionMockRecorder) Compare(other interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compare", reflect.TypeOf((*MockVersion)(nil).Compare), other)
}
// String mocks base method.
func (m *MockVersion) String() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "String")
ret0, _ := ret[0].(string)
return ret0
}
// String indicates an expected call of String.
func (mr *MockVersionMockRecorder) String() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockVersion)(nil).String))
}
// MockRuntime is a mock of Runtime interface.
type MockRuntime struct {
ctrl *gomock.Controller
recorder *MockRuntimeMockRecorder
}
// MockRuntimeMockRecorder is the mock recorder for MockRuntime.
type MockRuntimeMockRecorder struct {
mock *MockRuntime
}
// NewMockRuntime creates a new mock instance.
func NewMockRuntime(ctrl *gomock.Controller) *MockRuntime {
mock := &MockRuntime{ctrl: ctrl}
mock.recorder = &MockRuntimeMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder {
return m.recorder
}
// APIVersion mocks base method.
func (m *MockRuntime) APIVersion() (container.Version, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "APIVersion")
ret0, _ := ret[0].(container.Version)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// APIVersion indicates an expected call of APIVersion.
func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRuntime)(nil).APIVersion))
}
// CheckpointContainer mocks base method.
func (m *MockRuntime) CheckpointContainer(ctx context.Context, options *v10.CheckpointContainerRequest) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckpointContainer", ctx, options)
ret0, _ := ret[0].(error)
return ret0
}
// CheckpointContainer indicates an expected call of CheckpointContainer.
func (mr *MockRuntimeMockRecorder) CheckpointContainer(ctx, options interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckpointContainer", reflect.TypeOf((*MockRuntime)(nil).CheckpointContainer), ctx, options)
}
// DeleteContainer mocks base method.
func (m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteContainer", ctx, containerID)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteContainer indicates an expected call of DeleteContainer.
func (mr *MockRuntimeMockRecorder) DeleteContainer(ctx, containerID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockRuntime)(nil).DeleteContainer), ctx, containerID)
}
// GarbageCollect mocks base method.
func (m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GarbageCollect", ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)
ret0, _ := ret[0].(error)
return ret0
}
// GarbageCollect indicates an expected call of GarbageCollect.
func (mr *MockRuntimeMockRecorder) GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GarbageCollect", reflect.TypeOf((*MockRuntime)(nil).GarbageCollect), ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)
}
// GeneratePodStatus mocks base method.
func (m *MockRuntime) GeneratePodStatus(event *v10.ContainerEventResponse) (*container.PodStatus, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GeneratePodStatus", event)
ret0, _ := ret[0].(*container.PodStatus)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GeneratePodStatus indicates an expected call of GeneratePodStatus.
func (mr *MockRuntimeMockRecorder) GeneratePodStatus(event interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeneratePodStatus", reflect.TypeOf((*MockRuntime)(nil).GeneratePodStatus), event)
}
// GetContainerLogs mocks base method.
func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr)
ret0, _ := ret[0].(error)
return ret0
}
// GetContainerLogs indicates an expected call of GetContainerLogs.
func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogs", reflect.TypeOf((*MockRuntime)(nil).GetContainerLogs), ctx, pod, containerID, logOptions, stdout, stderr)
}
// GetImageRef mocks base method.
func (m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetImageRef", ctx, image)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetImageRef indicates an expected call of GetImageRef.
func (mr *MockRuntimeMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockRuntime)(nil).GetImageRef), ctx, image)
}
// GetPodStatus mocks base method.
func (m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*container.PodStatus, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPodStatus", ctx, uid, name, namespace)
ret0, _ := ret[0].(*container.PodStatus)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPodStatus indicates an expected call of GetPodStatus.
func (mr *MockRuntimeMockRecorder) GetPodStatus(ctx, uid, name, namespace interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodStatus", reflect.TypeOf((*MockRuntime)(nil).GetPodStatus), ctx, uid, name, namespace)
}
// GetPods mocks base method.
func (m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPods", ctx, all)
ret0, _ := ret[0].([]*container.Pod)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPods indicates an expected call of GetPods.
func (mr *MockRuntimeMockRecorder) GetPods(ctx, all interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntime)(nil).GetPods), ctx, all)
}
// ImageStats mocks base method.
func (m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageStats", ctx)
ret0, _ := ret[0].(*container.ImageStats)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImageStats indicates an expected call of ImageStats.
func (mr *MockRuntimeMockRecorder) ImageStats(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockRuntime)(nil).ImageStats), ctx)
}
// KillPod mocks base method.
func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "KillPod", ctx, pod, runningPod, gracePeriodOverride)
ret0, _ := ret[0].(error)
return ret0
}
// KillPod indicates an expected call of KillPod.
func (mr *MockRuntimeMockRecorder) KillPod(ctx, pod, runningPod, gracePeriodOverride interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillPod", reflect.TypeOf((*MockRuntime)(nil).KillPod), ctx, pod, runningPod, gracePeriodOverride)
}
// ListImages mocks base method.
func (m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListImages", ctx)
ret0, _ := ret[0].([]container.Image)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListImages indicates an expected call of ListImages.
func (mr *MockRuntimeMockRecorder) ListImages(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockRuntime)(nil).ListImages), ctx)
}
// PullImage mocks base method.
func (m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PullImage indicates an expected call of PullImage.
func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockRuntime)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig)
}
// RemoveImage mocks base method.
func (m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveImage", ctx, image)
ret0, _ := ret[0].(error)
return ret0
}
// RemoveImage indicates an expected call of RemoveImage.
func (mr *MockRuntimeMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockRuntime)(nil).RemoveImage), ctx, image)
}
// Status mocks base method.
func (m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Status", ctx)
ret0, _ := ret[0].(*container.RuntimeStatus)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Status indicates an expected call of Status.
func (mr *MockRuntimeMockRecorder) Status(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRuntime)(nil).Status), ctx)
}
// SyncPod mocks base method.
func (m *MockRuntime) SyncPod(ctx context.Context, pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SyncPod", ctx, pod, podStatus, pullSecrets, backOff)
ret0, _ := ret[0].(container.PodSyncResult)
return ret0
}
// SyncPod indicates an expected call of SyncPod.
func (mr *MockRuntimeMockRecorder) SyncPod(ctx, pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPod", reflect.TypeOf((*MockRuntime)(nil).SyncPod), ctx, pod, podStatus, pullSecrets, backOff)
}
// Type mocks base method.
func (m *MockRuntime) Type() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Type")
ret0, _ := ret[0].(string)
return ret0
}
// Type indicates an expected call of Type.
func (mr *MockRuntimeMockRecorder) Type() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockRuntime)(nil).Type))
}
// UpdatePodCIDR mocks base method.
func (m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdatePodCIDR", ctx, podCIDR)
ret0, _ := ret[0].(error)
return ret0
}
// UpdatePodCIDR indicates an expected call of UpdatePodCIDR.
func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(ctx, podCIDR interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePodCIDR", reflect.TypeOf((*MockRuntime)(nil).UpdatePodCIDR), ctx, podCIDR)
}
// Version mocks base method.
func (m *MockRuntime) Version(ctx context.Context) (container.Version, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Version", ctx)
ret0, _ := ret[0].(container.Version)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Version indicates an expected call of Version.
func (mr *MockRuntimeMockRecorder) Version(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockRuntime)(nil).Version), ctx)
}
// MockStreamingRuntime is a mock of StreamingRuntime interface.
type MockStreamingRuntime struct {
ctrl *gomock.Controller
recorder *MockStreamingRuntimeMockRecorder
}
// MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime.
type MockStreamingRuntimeMockRecorder struct {
mock *MockStreamingRuntime
}
// NewMockStreamingRuntime creates a new mock instance.
func NewMockStreamingRuntime(ctrl *gomock.Controller) *MockStreamingRuntime {
mock := &MockStreamingRuntime{ctrl: ctrl}
mock.recorder = &MockStreamingRuntimeMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder {
return m.recorder
}
// GetAttach mocks base method.
func (m *MockStreamingRuntime) GetAttach(ctx context.Context, id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAttach", ctx, id, stdin, stdout, stderr, tty)
ret0, _ := ret[0].(*url.URL)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAttach indicates an expected call of GetAttach.
func (mr *MockStreamingRuntimeMockRecorder) GetAttach(ctx, id, stdin, stdout, stderr, tty interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttach", reflect.TypeOf((*MockStreamingRuntime)(nil).GetAttach), ctx, id, stdin, stdout, stderr, tty)
}
// GetExec mocks base method.
func (m *MockStreamingRuntime) GetExec(ctx context.Context, id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetExec", ctx, id, cmd, stdin, stdout, stderr, tty)
ret0, _ := ret[0].(*url.URL)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetExec indicates an expected call of GetExec.
func (mr *MockStreamingRuntimeMockRecorder) GetExec(ctx, id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExec", reflect.TypeOf((*MockStreamingRuntime)(nil).GetExec), ctx, id, cmd, stdin, stdout, stderr, tty)
}
// GetPortForward mocks base method.
func (m *MockStreamingRuntime) GetPortForward(ctx context.Context, podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPortForward", ctx, podName, podNamespace, podUID, ports)
ret0, _ := ret[0].(*url.URL)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetPortForward indicates an expected call of GetPortForward.
func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(ctx, podName, podNamespace, podUID, ports interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPortForward", reflect.TypeOf((*MockStreamingRuntime)(nil).GetPortForward), ctx, podName, podNamespace, podUID, ports)
}
// MockImageService is a mock of ImageService interface.
type MockImageService struct {
ctrl *gomock.Controller
recorder *MockImageServiceMockRecorder
}
// MockImageServiceMockRecorder is the mock recorder for MockImageService.
type MockImageServiceMockRecorder struct {
mock *MockImageService
}
// NewMockImageService creates a new mock instance.
func NewMockImageService(ctrl *gomock.Controller) *MockImageService {
mock := &MockImageService{ctrl: ctrl}
mock.recorder = &MockImageServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder {
return m.recorder
}
// GetImageRef mocks base method.
func (m *MockImageService) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetImageRef", ctx, image)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetImageRef indicates an expected call of GetImageRef.
func (mr *MockImageServiceMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockImageService)(nil).GetImageRef), ctx, image)
}
// ImageStats mocks base method.
func (m *MockImageService) ImageStats(ctx context.Context) (*container.ImageStats, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ImageStats", ctx)
ret0, _ := ret[0].(*container.ImageStats)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ImageStats indicates an expected call of ImageStats.
func (mr *MockImageServiceMockRecorder) ImageStats(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockImageService)(nil).ImageStats), ctx)
}
// ListImages mocks base method.
func (m *MockImageService) ListImages(ctx context.Context) ([]container.Image, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListImages", ctx)
ret0, _ := ret[0].([]container.Image)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListImages indicates an expected call of ListImages.
func (mr *MockImageServiceMockRecorder) ListImages(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockImageService)(nil).ListImages), ctx)
}
// PullImage mocks base method.
func (m *MockImageService) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PullImage indicates an expected call of PullImage.
func (mr *MockImageServiceMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockImageService)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig)
}
// RemoveImage mocks base method.
func (m *MockImageService) RemoveImage(ctx context.Context, image container.ImageSpec) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveImage", ctx, image)
ret0, _ := ret[0].(error)
return ret0
}
// RemoveImage indicates an expected call of RemoveImage.
func (mr *MockImageServiceMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockImageService)(nil).RemoveImage), ctx, image)
}
// MockAttacher is a mock of Attacher interface.
type MockAttacher struct {
ctrl *gomock.Controller
recorder *MockAttacherMockRecorder
}
// MockAttacherMockRecorder is the mock recorder for MockAttacher.
type MockAttacherMockRecorder struct {
mock *MockAttacher
}
// NewMockAttacher creates a new mock instance.
func NewMockAttacher(ctrl *gomock.Controller) *MockAttacher {
mock := &MockAttacher{ctrl: ctrl}
mock.recorder = &MockAttacherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAttacher) EXPECT() *MockAttacherMockRecorder {
return m.recorder
}
// AttachContainer mocks base method.
func (m *MockAttacher) AttachContainer(ctx context.Context, id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AttachContainer", ctx, id, stdin, stdout, stderr, tty, resize)
ret0, _ := ret[0].(error)
return ret0
}
// AttachContainer indicates an expected call of AttachContainer.
func (mr *MockAttacherMockRecorder) AttachContainer(ctx, id, stdin, stdout, stderr, tty, resize interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachContainer", reflect.TypeOf((*MockAttacher)(nil).AttachContainer), ctx, id, stdin, stdout, stderr, tty, resize)
}
// MockCommandRunner is a mock of CommandRunner interface.
type MockCommandRunner struct {
ctrl *gomock.Controller
recorder *MockCommandRunnerMockRecorder
}
// MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner.
type MockCommandRunnerMockRecorder struct {
mock *MockCommandRunner
}
// NewMockCommandRunner creates a new mock instance.
func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner {
mock := &MockCommandRunner{ctrl: ctrl}
mock.recorder = &MockCommandRunnerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder {
return m.recorder
}
// RunInContainer mocks base method.
func (m *MockCommandRunner) RunInContainer(ctx context.Context, id container.ContainerID, cmd []string, timeout time.Duration) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RunInContainer", ctx, id, cmd, timeout)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RunInContainer indicates an expected call of RunInContainer.
func (mr *MockCommandRunnerMockRecorder) RunInContainer(ctx, id, cmd, timeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInContainer", reflect.TypeOf((*MockCommandRunner)(nil).RunInContainer), ctx, id, cmd, timeout)
}