/
pod_interface.go
855 lines (709 loc) · 28.1 KB
/
pod_interface.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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
// Code generated by mockery v2.15.0. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
corev1 "k8s.io/api/core/v1"
policyv1 "k8s.io/api/policy/v1"
v1beta1 "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
v1 "k8s.io/client-go/applyconfigurations/core/v1"
rest "k8s.io/client-go/rest"
)
// PodInterface is an autogenerated mock type for the PodInterface type
type PodInterface struct {
mock.Mock
}
type PodInterface_Expecter struct {
mock *mock.Mock
}
func (_m *PodInterface) EXPECT() *PodInterface_Expecter {
return &PodInterface_Expecter{mock: &_m.Mock}
}
// Apply provides a mock function with given fields: ctx, pod, opts
func (_m *PodInterface) Apply(ctx context.Context, pod *v1.PodApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *v1.PodApplyConfiguration, metav1.ApplyOptions) *corev1.Pod); ok {
r0 = rf(ctx, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.PodApplyConfiguration, metav1.ApplyOptions) error); ok {
r1 = rf(ctx, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'
type PodInterface_Apply_Call struct {
*mock.Call
}
// Apply is a helper method to define mock.On call
// - ctx context.Context
// - pod *v1.PodApplyConfiguration
// - opts metav1.ApplyOptions
func (_e *PodInterface_Expecter) Apply(ctx interface{}, pod interface{}, opts interface{}) *PodInterface_Apply_Call {
return &PodInterface_Apply_Call{Call: _e.mock.On("Apply", ctx, pod, opts)}
}
func (_c *PodInterface_Apply_Call) Run(run func(ctx context.Context, pod *v1.PodApplyConfiguration, opts metav1.ApplyOptions)) *PodInterface_Apply_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*v1.PodApplyConfiguration), args[2].(metav1.ApplyOptions))
})
return _c
}
func (_c *PodInterface_Apply_Call) Return(result *corev1.Pod, err error) *PodInterface_Apply_Call {
_c.Call.Return(result, err)
return _c
}
// ApplyStatus provides a mock function with given fields: ctx, pod, opts
func (_m *PodInterface) ApplyStatus(ctx context.Context, pod *v1.PodApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *v1.PodApplyConfiguration, metav1.ApplyOptions) *corev1.Pod); ok {
r0 = rf(ctx, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.PodApplyConfiguration, metav1.ApplyOptions) error); ok {
r1 = rf(ctx, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_ApplyStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyStatus'
type PodInterface_ApplyStatus_Call struct {
*mock.Call
}
// ApplyStatus is a helper method to define mock.On call
// - ctx context.Context
// - pod *v1.PodApplyConfiguration
// - opts metav1.ApplyOptions
func (_e *PodInterface_Expecter) ApplyStatus(ctx interface{}, pod interface{}, opts interface{}) *PodInterface_ApplyStatus_Call {
return &PodInterface_ApplyStatus_Call{Call: _e.mock.On("ApplyStatus", ctx, pod, opts)}
}
func (_c *PodInterface_ApplyStatus_Call) Run(run func(ctx context.Context, pod *v1.PodApplyConfiguration, opts metav1.ApplyOptions)) *PodInterface_ApplyStatus_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*v1.PodApplyConfiguration), args[2].(metav1.ApplyOptions))
})
return _c
}
func (_c *PodInterface_ApplyStatus_Call) Return(result *corev1.Pod, err error) *PodInterface_ApplyStatus_Call {
_c.Call.Return(result, err)
return _c
}
// Bind provides a mock function with given fields: ctx, binding, opts
func (_m *PodInterface) Bind(ctx context.Context, binding *corev1.Binding, opts metav1.CreateOptions) error {
ret := _m.Called(ctx, binding, opts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *corev1.Binding, metav1.CreateOptions) error); ok {
r0 = rf(ctx, binding, opts)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind'
type PodInterface_Bind_Call struct {
*mock.Call
}
// Bind is a helper method to define mock.On call
// - ctx context.Context
// - binding *corev1.Binding
// - opts metav1.CreateOptions
func (_e *PodInterface_Expecter) Bind(ctx interface{}, binding interface{}, opts interface{}) *PodInterface_Bind_Call {
return &PodInterface_Bind_Call{Call: _e.mock.On("Bind", ctx, binding, opts)}
}
func (_c *PodInterface_Bind_Call) Run(run func(ctx context.Context, binding *corev1.Binding, opts metav1.CreateOptions)) *PodInterface_Bind_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*corev1.Binding), args[2].(metav1.CreateOptions))
})
return _c
}
func (_c *PodInterface_Bind_Call) Return(_a0 error) *PodInterface_Bind_Call {
_c.Call.Return(_a0)
return _c
}
// Create provides a mock function with given fields: ctx, pod, opts
func (_m *PodInterface) Create(ctx context.Context, pod *corev1.Pod, opts metav1.CreateOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, metav1.CreateOptions) *corev1.Pod); ok {
r0 = rf(ctx, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *corev1.Pod, metav1.CreateOptions) error); ok {
r1 = rf(ctx, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type PodInterface_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - ctx context.Context
// - pod *corev1.Pod
// - opts metav1.CreateOptions
func (_e *PodInterface_Expecter) Create(ctx interface{}, pod interface{}, opts interface{}) *PodInterface_Create_Call {
return &PodInterface_Create_Call{Call: _e.mock.On("Create", ctx, pod, opts)}
}
func (_c *PodInterface_Create_Call) Run(run func(ctx context.Context, pod *corev1.Pod, opts metav1.CreateOptions)) *PodInterface_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(metav1.CreateOptions))
})
return _c
}
func (_c *PodInterface_Create_Call) Return(_a0 *corev1.Pod, _a1 error) *PodInterface_Create_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// Delete provides a mock function with given fields: ctx, name, opts
func (_m *PodInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
ret := _m.Called(ctx, name, opts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok {
r0 = rf(ctx, name, opts)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type PodInterface_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - ctx context.Context
// - name string
// - opts metav1.DeleteOptions
func (_e *PodInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *PodInterface_Delete_Call {
return &PodInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)}
}
func (_c *PodInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts metav1.DeleteOptions)) *PodInterface_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(metav1.DeleteOptions))
})
return _c
}
func (_c *PodInterface_Delete_Call) Return(_a0 error) *PodInterface_Delete_Call {
_c.Call.Return(_a0)
return _c
}
// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts
func (_m *PodInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
ret := _m.Called(ctx, opts, listOpts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok {
r0 = rf(ctx, opts, listOpts)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_DeleteCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCollection'
type PodInterface_DeleteCollection_Call struct {
*mock.Call
}
// DeleteCollection is a helper method to define mock.On call
// - ctx context.Context
// - opts metav1.DeleteOptions
// - listOpts metav1.ListOptions
func (_e *PodInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *PodInterface_DeleteCollection_Call {
return &PodInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)}
}
func (_c *PodInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions)) *PodInterface_DeleteCollection_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(metav1.DeleteOptions), args[2].(metav1.ListOptions))
})
return _c
}
func (_c *PodInterface_DeleteCollection_Call) Return(_a0 error) *PodInterface_DeleteCollection_Call {
_c.Call.Return(_a0)
return _c
}
// Evict provides a mock function with given fields: ctx, eviction
func (_m *PodInterface) Evict(ctx context.Context, eviction *v1beta1.Eviction) error {
ret := _m.Called(ctx, eviction)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.Eviction) error); ok {
r0 = rf(ctx, eviction)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_Evict_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Evict'
type PodInterface_Evict_Call struct {
*mock.Call
}
// Evict is a helper method to define mock.On call
// - ctx context.Context
// - eviction *v1beta1.Eviction
func (_e *PodInterface_Expecter) Evict(ctx interface{}, eviction interface{}) *PodInterface_Evict_Call {
return &PodInterface_Evict_Call{Call: _e.mock.On("Evict", ctx, eviction)}
}
func (_c *PodInterface_Evict_Call) Run(run func(ctx context.Context, eviction *v1beta1.Eviction)) *PodInterface_Evict_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*v1beta1.Eviction))
})
return _c
}
func (_c *PodInterface_Evict_Call) Return(_a0 error) *PodInterface_Evict_Call {
_c.Call.Return(_a0)
return _c
}
// EvictV1 provides a mock function with given fields: ctx, eviction
func (_m *PodInterface) EvictV1(ctx context.Context, eviction *policyv1.Eviction) error {
ret := _m.Called(ctx, eviction)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *policyv1.Eviction) error); ok {
r0 = rf(ctx, eviction)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_EvictV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EvictV1'
type PodInterface_EvictV1_Call struct {
*mock.Call
}
// EvictV1 is a helper method to define mock.On call
// - ctx context.Context
// - eviction *policyv1.Eviction
func (_e *PodInterface_Expecter) EvictV1(ctx interface{}, eviction interface{}) *PodInterface_EvictV1_Call {
return &PodInterface_EvictV1_Call{Call: _e.mock.On("EvictV1", ctx, eviction)}
}
func (_c *PodInterface_EvictV1_Call) Run(run func(ctx context.Context, eviction *policyv1.Eviction)) *PodInterface_EvictV1_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*policyv1.Eviction))
})
return _c
}
func (_c *PodInterface_EvictV1_Call) Return(_a0 error) *PodInterface_EvictV1_Call {
_c.Call.Return(_a0)
return _c
}
// EvictV1beta1 provides a mock function with given fields: ctx, eviction
func (_m *PodInterface) EvictV1beta1(ctx context.Context, eviction *v1beta1.Eviction) error {
ret := _m.Called(ctx, eviction)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.Eviction) error); ok {
r0 = rf(ctx, eviction)
} else {
r0 = ret.Error(0)
}
return r0
}
// PodInterface_EvictV1beta1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EvictV1beta1'
type PodInterface_EvictV1beta1_Call struct {
*mock.Call
}
// EvictV1beta1 is a helper method to define mock.On call
// - ctx context.Context
// - eviction *v1beta1.Eviction
func (_e *PodInterface_Expecter) EvictV1beta1(ctx interface{}, eviction interface{}) *PodInterface_EvictV1beta1_Call {
return &PodInterface_EvictV1beta1_Call{Call: _e.mock.On("EvictV1beta1", ctx, eviction)}
}
func (_c *PodInterface_EvictV1beta1_Call) Run(run func(ctx context.Context, eviction *v1beta1.Eviction)) *PodInterface_EvictV1beta1_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*v1beta1.Eviction))
})
return _c
}
func (_c *PodInterface_EvictV1beta1_Call) Return(_a0 error) *PodInterface_EvictV1beta1_Call {
_c.Call.Return(_a0)
return _c
}
// Get provides a mock function with given fields: ctx, name, opts
func (_m *PodInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, name, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *corev1.Pod); ok {
r0 = rf(ctx, name, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok {
r1 = rf(ctx, name, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type PodInterface_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - ctx context.Context
// - name string
// - opts metav1.GetOptions
func (_e *PodInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *PodInterface_Get_Call {
return &PodInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)}
}
func (_c *PodInterface_Get_Call) Run(run func(ctx context.Context, name string, opts metav1.GetOptions)) *PodInterface_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions))
})
return _c
}
func (_c *PodInterface_Get_Call) Return(_a0 *corev1.Pod, _a1 error) *PodInterface_Get_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// GetLogs provides a mock function with given fields: name, opts
func (_m *PodInterface) GetLogs(name string, opts *corev1.PodLogOptions) *rest.Request {
ret := _m.Called(name, opts)
var r0 *rest.Request
if rf, ok := ret.Get(0).(func(string, *corev1.PodLogOptions) *rest.Request); ok {
r0 = rf(name, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*rest.Request)
}
}
return r0
}
// PodInterface_GetLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogs'
type PodInterface_GetLogs_Call struct {
*mock.Call
}
// GetLogs is a helper method to define mock.On call
// - name string
// - opts *corev1.PodLogOptions
func (_e *PodInterface_Expecter) GetLogs(name interface{}, opts interface{}) *PodInterface_GetLogs_Call {
return &PodInterface_GetLogs_Call{Call: _e.mock.On("GetLogs", name, opts)}
}
func (_c *PodInterface_GetLogs_Call) Run(run func(name string, opts *corev1.PodLogOptions)) *PodInterface_GetLogs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(*corev1.PodLogOptions))
})
return _c
}
func (_c *PodInterface_GetLogs_Call) Return(_a0 *rest.Request) *PodInterface_GetLogs_Call {
_c.Call.Return(_a0)
return _c
}
// List provides a mock function with given fields: ctx, opts
func (_m *PodInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error) {
ret := _m.Called(ctx, opts)
var r0 *corev1.PodList
if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *corev1.PodList); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.PodList)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type PodInterface_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
// - ctx context.Context
// - opts metav1.ListOptions
func (_e *PodInterface_Expecter) List(ctx interface{}, opts interface{}) *PodInterface_List_Call {
return &PodInterface_List_Call{Call: _e.mock.On("List", ctx, opts)}
}
func (_c *PodInterface_List_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *PodInterface_List_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(metav1.ListOptions))
})
return _c
}
func (_c *PodInterface_List_Call) Return(_a0 *corev1.PodList, _a1 error) *PodInterface_List_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources
func (_m *PodInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*corev1.Pod, error) {
_va := make([]interface{}, len(subresources))
for _i := range subresources {
_va[_i] = subresources[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, name, pt, data, opts)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *corev1.Pod); ok {
r0 = rf(ctx, name, pt, data, opts, subresources...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok {
r1 = rf(ctx, name, pt, data, opts, subresources...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch'
type PodInterface_Patch_Call struct {
*mock.Call
}
// Patch is a helper method to define mock.On call
// - ctx context.Context
// - name string
// - pt types.PatchType
// - data []byte
// - opts metav1.PatchOptions
// - subresources ...string
func (_e *PodInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *PodInterface_Patch_Call {
return &PodInterface_Patch_Call{Call: _e.mock.On("Patch",
append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)}
}
func (_c *PodInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string)) *PodInterface_Patch_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]string, len(args)-5)
for i, a := range args[5:] {
if a != nil {
variadicArgs[i] = a.(string)
}
}
run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(metav1.PatchOptions), variadicArgs...)
})
return _c
}
func (_c *PodInterface_Patch_Call) Return(result *corev1.Pod, err error) *PodInterface_Patch_Call {
_c.Call.Return(result, err)
return _c
}
// ProxyGet provides a mock function with given fields: scheme, name, port, path, params
func (_m *PodInterface) ProxyGet(scheme string, name string, port string, path string, params map[string]string) rest.ResponseWrapper {
ret := _m.Called(scheme, name, port, path, params)
var r0 rest.ResponseWrapper
if rf, ok := ret.Get(0).(func(string, string, string, string, map[string]string) rest.ResponseWrapper); ok {
r0 = rf(scheme, name, port, path, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(rest.ResponseWrapper)
}
}
return r0
}
// PodInterface_ProxyGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProxyGet'
type PodInterface_ProxyGet_Call struct {
*mock.Call
}
// ProxyGet is a helper method to define mock.On call
// - scheme string
// - name string
// - port string
// - path string
// - params map[string]string
func (_e *PodInterface_Expecter) ProxyGet(scheme interface{}, name interface{}, port interface{}, path interface{}, params interface{}) *PodInterface_ProxyGet_Call {
return &PodInterface_ProxyGet_Call{Call: _e.mock.On("ProxyGet", scheme, name, port, path, params)}
}
func (_c *PodInterface_ProxyGet_Call) Run(run func(scheme string, name string, port string, path string, params map[string]string)) *PodInterface_ProxyGet_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(string), args[3].(string), args[4].(map[string]string))
})
return _c
}
func (_c *PodInterface_ProxyGet_Call) Return(_a0 rest.ResponseWrapper) *PodInterface_ProxyGet_Call {
_c.Call.Return(_a0)
return _c
}
// Update provides a mock function with given fields: ctx, pod, opts
func (_m *PodInterface) Update(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, metav1.UpdateOptions) *corev1.Pod); ok {
r0 = rf(ctx, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *corev1.Pod, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
type PodInterface_Update_Call struct {
*mock.Call
}
// Update is a helper method to define mock.On call
// - ctx context.Context
// - pod *corev1.Pod
// - opts metav1.UpdateOptions
func (_e *PodInterface_Expecter) Update(ctx interface{}, pod interface{}, opts interface{}) *PodInterface_Update_Call {
return &PodInterface_Update_Call{Call: _e.mock.On("Update", ctx, pod, opts)}
}
func (_c *PodInterface_Update_Call) Run(run func(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions)) *PodInterface_Update_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(metav1.UpdateOptions))
})
return _c
}
func (_c *PodInterface_Update_Call) Return(_a0 *corev1.Pod, _a1 error) *PodInterface_Update_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// UpdateEphemeralContainers provides a mock function with given fields: ctx, podName, pod, opts
func (_m *PodInterface) UpdateEphemeralContainers(ctx context.Context, podName string, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, podName, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, string, *corev1.Pod, metav1.UpdateOptions) *corev1.Pod); ok {
r0 = rf(ctx, podName, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *corev1.Pod, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, podName, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_UpdateEphemeralContainers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateEphemeralContainers'
type PodInterface_UpdateEphemeralContainers_Call struct {
*mock.Call
}
// UpdateEphemeralContainers is a helper method to define mock.On call
// - ctx context.Context
// - podName string
// - pod *corev1.Pod
// - opts metav1.UpdateOptions
func (_e *PodInterface_Expecter) UpdateEphemeralContainers(ctx interface{}, podName interface{}, pod interface{}, opts interface{}) *PodInterface_UpdateEphemeralContainers_Call {
return &PodInterface_UpdateEphemeralContainers_Call{Call: _e.mock.On("UpdateEphemeralContainers", ctx, podName, pod, opts)}
}
func (_c *PodInterface_UpdateEphemeralContainers_Call) Run(run func(ctx context.Context, podName string, pod *corev1.Pod, opts metav1.UpdateOptions)) *PodInterface_UpdateEphemeralContainers_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(*corev1.Pod), args[3].(metav1.UpdateOptions))
})
return _c
}
func (_c *PodInterface_UpdateEphemeralContainers_Call) Return(_a0 *corev1.Pod, _a1 error) *PodInterface_UpdateEphemeralContainers_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// UpdateStatus provides a mock function with given fields: ctx, pod, opts
func (_m *PodInterface) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) {
ret := _m.Called(ctx, pod, opts)
var r0 *corev1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *corev1.Pod, metav1.UpdateOptions) *corev1.Pod); ok {
r0 = rf(ctx, pod, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*corev1.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *corev1.Pod, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, pod, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_UpdateStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStatus'
type PodInterface_UpdateStatus_Call struct {
*mock.Call
}
// UpdateStatus is a helper method to define mock.On call
// - ctx context.Context
// - pod *corev1.Pod
// - opts metav1.UpdateOptions
func (_e *PodInterface_Expecter) UpdateStatus(ctx interface{}, pod interface{}, opts interface{}) *PodInterface_UpdateStatus_Call {
return &PodInterface_UpdateStatus_Call{Call: _e.mock.On("UpdateStatus", ctx, pod, opts)}
}
func (_c *PodInterface_UpdateStatus_Call) Run(run func(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions)) *PodInterface_UpdateStatus_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*corev1.Pod), args[2].(metav1.UpdateOptions))
})
return _c
}
func (_c *PodInterface_UpdateStatus_Call) Return(_a0 *corev1.Pod, _a1 error) *PodInterface_UpdateStatus_Call {
_c.Call.Return(_a0, _a1)
return _c
}
// Watch provides a mock function with given fields: ctx, opts
func (_m *PodInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
ret := _m.Called(ctx, opts)
var r0 watch.Interface
if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(watch.Interface)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
type PodInterface_Watch_Call struct {
*mock.Call
}
// Watch is a helper method to define mock.On call
// - ctx context.Context
// - opts metav1.ListOptions
func (_e *PodInterface_Expecter) Watch(ctx interface{}, opts interface{}) *PodInterface_Watch_Call {
return &PodInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)}
}
func (_c *PodInterface_Watch_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *PodInterface_Watch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(metav1.ListOptions))
})
return _c
}
func (_c *PodInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *PodInterface_Watch_Call {
_c.Call.Return(_a0, _a1)
return _c
}
type mockConstructorTestingTNewPodInterface interface {
mock.TestingT
Cleanup(func())
}
// NewPodInterface creates a new instance of PodInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewPodInterface(t mockConstructorTestingTNewPodInterface) *PodInterface {
mock := &PodInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}