This repository has been archived by the owner on May 25, 2021. It is now read-only.
forked from rancher/types
/
zz_generated_config_map_mock.go
1846 lines (1729 loc) · 63.7 KB
/
zz_generated_config_map_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
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
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package fakes
import (
context "context"
sync "sync"
time "time"
controller "github.com/rancher/norman/controller"
objectclient "github.com/rancher/norman/objectclient"
v1a "github.com/rancher/types/apis/core/v1"
v1 "k8s.io/api/core/v1"
v1b "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
var (
lockConfigMapListerMockGet sync.RWMutex
lockConfigMapListerMockList sync.RWMutex
)
// Ensure, that ConfigMapListerMock does implement ConfigMapLister.
// If this is not the case, regenerate this file with moq.
var _ v1a.ConfigMapLister = &ConfigMapListerMock{}
// ConfigMapListerMock is a mock implementation of ConfigMapLister.
//
// func TestSomethingThatUsesConfigMapLister(t *testing.T) {
//
// // make and configure a mocked ConfigMapLister
// mockedConfigMapLister := &ConfigMapListerMock{
// GetFunc: func(namespace string, name string) (*v1.ConfigMap, error) {
// panic("mock out the Get method")
// },
// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error) {
// panic("mock out the List method")
// },
// }
//
// // use mockedConfigMapLister in code that requires ConfigMapLister
// // and then make assertions.
//
// }
type ConfigMapListerMock struct {
// GetFunc mocks the Get method.
GetFunc func(namespace string, name string) (*v1.ConfigMap, error)
// ListFunc mocks the List method.
ListFunc func(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error)
// calls tracks calls to the methods.
calls struct {
// Get holds details about calls to the Get method.
Get []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
}
// List holds details about calls to the List method.
List []struct {
// Namespace is the namespace argument value.
Namespace string
// Selector is the selector argument value.
Selector labels.Selector
}
}
}
// Get calls GetFunc.
func (mock *ConfigMapListerMock) Get(namespace string, name string) (*v1.ConfigMap, error) {
if mock.GetFunc == nil {
panic("ConfigMapListerMock.GetFunc: method is nil but ConfigMapLister.Get was just called")
}
callInfo := struct {
Namespace string
Name string
}{
Namespace: namespace,
Name: name,
}
lockConfigMapListerMockGet.Lock()
mock.calls.Get = append(mock.calls.Get, callInfo)
lockConfigMapListerMockGet.Unlock()
return mock.GetFunc(namespace, name)
}
// GetCalls gets all the calls that were made to Get.
// Check the length with:
// len(mockedConfigMapLister.GetCalls())
func (mock *ConfigMapListerMock) GetCalls() []struct {
Namespace string
Name string
} {
var calls []struct {
Namespace string
Name string
}
lockConfigMapListerMockGet.RLock()
calls = mock.calls.Get
lockConfigMapListerMockGet.RUnlock()
return calls
}
// List calls ListFunc.
func (mock *ConfigMapListerMock) List(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error) {
if mock.ListFunc == nil {
panic("ConfigMapListerMock.ListFunc: method is nil but ConfigMapLister.List was just called")
}
callInfo := struct {
Namespace string
Selector labels.Selector
}{
Namespace: namespace,
Selector: selector,
}
lockConfigMapListerMockList.Lock()
mock.calls.List = append(mock.calls.List, callInfo)
lockConfigMapListerMockList.Unlock()
return mock.ListFunc(namespace, selector)
}
// ListCalls gets all the calls that were made to List.
// Check the length with:
// len(mockedConfigMapLister.ListCalls())
func (mock *ConfigMapListerMock) ListCalls() []struct {
Namespace string
Selector labels.Selector
} {
var calls []struct {
Namespace string
Selector labels.Selector
}
lockConfigMapListerMockList.RLock()
calls = mock.calls.List
lockConfigMapListerMockList.RUnlock()
return calls
}
var (
lockConfigMapControllerMockAddClusterScopedFeatureHandler sync.RWMutex
lockConfigMapControllerMockAddClusterScopedHandler sync.RWMutex
lockConfigMapControllerMockAddFeatureHandler sync.RWMutex
lockConfigMapControllerMockAddHandler sync.RWMutex
lockConfigMapControllerMockEnqueue sync.RWMutex
lockConfigMapControllerMockEnqueueAfter sync.RWMutex
lockConfigMapControllerMockGeneric sync.RWMutex
lockConfigMapControllerMockInformer sync.RWMutex
lockConfigMapControllerMockLister sync.RWMutex
lockConfigMapControllerMockStart sync.RWMutex
lockConfigMapControllerMockSync sync.RWMutex
)
// Ensure, that ConfigMapControllerMock does implement ConfigMapController.
// If this is not the case, regenerate this file with moq.
var _ v1a.ConfigMapController = &ConfigMapControllerMock{}
// ConfigMapControllerMock is a mock implementation of ConfigMapController.
//
// func TestSomethingThatUsesConfigMapController(t *testing.T) {
//
// // make and configure a mocked ConfigMapController
// mockedConfigMapController := &ConfigMapControllerMock{
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddClusterScopedFeatureHandler method")
// },
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddClusterScopedHandler method")
// },
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddFeatureHandler method")
// },
// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddHandler method")
// },
// EnqueueFunc: func(namespace string, name string) {
// panic("mock out the Enqueue method")
// },
// EnqueueAfterFunc: func(namespace string, name string, after time.Duration) {
// panic("mock out the EnqueueAfter method")
// },
// GenericFunc: func() controller.GenericController {
// panic("mock out the Generic method")
// },
// InformerFunc: func() cache.SharedIndexInformer {
// panic("mock out the Informer method")
// },
// ListerFunc: func() v1a.ConfigMapLister {
// panic("mock out the Lister method")
// },
// StartFunc: func(ctx context.Context, threadiness int) error {
// panic("mock out the Start method")
// },
// SyncFunc: func(ctx context.Context) error {
// panic("mock out the Sync method")
// },
// }
//
// // use mockedConfigMapController in code that requires ConfigMapController
// // and then make assertions.
//
// }
type ConfigMapControllerMock struct {
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.ConfigMapHandlerFunc)
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc)
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.ConfigMapHandlerFunc)
// AddHandlerFunc mocks the AddHandler method.
AddHandlerFunc func(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc)
// EnqueueFunc mocks the Enqueue method.
EnqueueFunc func(namespace string, name string)
// EnqueueAfterFunc mocks the EnqueueAfter method.
EnqueueAfterFunc func(namespace string, name string, after time.Duration)
// GenericFunc mocks the Generic method.
GenericFunc func() controller.GenericController
// InformerFunc mocks the Informer method.
InformerFunc func() cache.SharedIndexInformer
// ListerFunc mocks the Lister method.
ListerFunc func() v1a.ConfigMapLister
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, threadiness int) error
// SyncFunc mocks the Sync method.
SyncFunc func(ctx context.Context) error
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Handler is the handler argument value.
Handler v1a.ConfigMapHandlerFunc
}
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
AddClusterScopedHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Handler is the handler argument value.
Handler v1a.ConfigMapHandlerFunc
}
// AddFeatureHandler holds details about calls to the AddFeatureHandler method.
AddFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v1a.ConfigMapHandlerFunc
}
// AddHandler holds details about calls to the AddHandler method.
AddHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Handler is the handler argument value.
Handler v1a.ConfigMapHandlerFunc
}
// Enqueue holds details about calls to the Enqueue method.
Enqueue []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
}
// EnqueueAfter holds details about calls to the EnqueueAfter method.
EnqueueAfter []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
// After is the after argument value.
After time.Duration
}
// Generic holds details about calls to the Generic method.
Generic []struct {
}
// Informer holds details about calls to the Informer method.
Informer []struct {
}
// Lister holds details about calls to the Lister method.
Lister []struct {
}
// Start holds details about calls to the Start method.
Start []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Threadiness is the threadiness argument value.
Threadiness int
}
// Sync holds details about calls to the Sync method.
Sync []struct {
// Ctx is the ctx argument value.
Ctx context.Context
}
}
}
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
func (mock *ConfigMapControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) {
if mock.AddClusterScopedFeatureHandlerFunc == nil {
panic("ConfigMapControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but ConfigMapController.AddClusterScopedFeatureHandler was just called")
}
callInfo := struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
}{
Ctx: ctx,
Enabled: enabled,
Name: name,
ClusterName: clusterName,
Handler: handler,
}
lockConfigMapControllerMockAddClusterScopedFeatureHandler.Lock()
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
lockConfigMapControllerMockAddClusterScopedFeatureHandler.Unlock()
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler)
}
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
// Check the length with:
// len(mockedConfigMapController.AddClusterScopedFeatureHandlerCalls())
func (mock *ConfigMapControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
} {
var calls []struct {
Ctx context.Context
Enabled func() bool
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
}
lockConfigMapControllerMockAddClusterScopedFeatureHandler.RLock()
calls = mock.calls.AddClusterScopedFeatureHandler
lockConfigMapControllerMockAddClusterScopedFeatureHandler.RUnlock()
return calls
}
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
func (mock *ConfigMapControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) {
if mock.AddClusterScopedHandlerFunc == nil {
panic("ConfigMapControllerMock.AddClusterScopedHandlerFunc: method is nil but ConfigMapController.AddClusterScopedHandler was just called")
}
callInfo := struct {
Ctx context.Context
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
}{
Ctx: ctx,
Name: name,
ClusterName: clusterName,
Handler: handler,
}
lockConfigMapControllerMockAddClusterScopedHandler.Lock()
mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo)
lockConfigMapControllerMockAddClusterScopedHandler.Unlock()
mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler)
}
// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler.
// Check the length with:
// len(mockedConfigMapController.AddClusterScopedHandlerCalls())
func (mock *ConfigMapControllerMock) AddClusterScopedHandlerCalls() []struct {
Ctx context.Context
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
} {
var calls []struct {
Ctx context.Context
Name string
ClusterName string
Handler v1a.ConfigMapHandlerFunc
}
lockConfigMapControllerMockAddClusterScopedHandler.RLock()
calls = mock.calls.AddClusterScopedHandler
lockConfigMapControllerMockAddClusterScopedHandler.RUnlock()
return calls
}
// AddFeatureHandler calls AddFeatureHandlerFunc.
func (mock *ConfigMapControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1a.ConfigMapHandlerFunc) {
if mock.AddFeatureHandlerFunc == nil {
panic("ConfigMapControllerMock.AddFeatureHandlerFunc: method is nil but ConfigMapController.AddFeatureHandler was just called")
}
callInfo := struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v1a.ConfigMapHandlerFunc
}{
Ctx: ctx,
Enabled: enabled,
Name: name,
Sync: sync,
}
lockConfigMapControllerMockAddFeatureHandler.Lock()
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
lockConfigMapControllerMockAddFeatureHandler.Unlock()
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
}
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
// Check the length with:
// len(mockedConfigMapController.AddFeatureHandlerCalls())
func (mock *ConfigMapControllerMock) AddFeatureHandlerCalls() []struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v1a.ConfigMapHandlerFunc
} {
var calls []struct {
Ctx context.Context
Enabled func() bool
Name string
Sync v1a.ConfigMapHandlerFunc
}
lockConfigMapControllerMockAddFeatureHandler.RLock()
calls = mock.calls.AddFeatureHandler
lockConfigMapControllerMockAddFeatureHandler.RUnlock()
return calls
}
// AddHandler calls AddHandlerFunc.
func (mock *ConfigMapControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc) {
if mock.AddHandlerFunc == nil {
panic("ConfigMapControllerMock.AddHandlerFunc: method is nil but ConfigMapController.AddHandler was just called")
}
callInfo := struct {
Ctx context.Context
Name string
Handler v1a.ConfigMapHandlerFunc
}{
Ctx: ctx,
Name: name,
Handler: handler,
}
lockConfigMapControllerMockAddHandler.Lock()
mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo)
lockConfigMapControllerMockAddHandler.Unlock()
mock.AddHandlerFunc(ctx, name, handler)
}
// AddHandlerCalls gets all the calls that were made to AddHandler.
// Check the length with:
// len(mockedConfigMapController.AddHandlerCalls())
func (mock *ConfigMapControllerMock) AddHandlerCalls() []struct {
Ctx context.Context
Name string
Handler v1a.ConfigMapHandlerFunc
} {
var calls []struct {
Ctx context.Context
Name string
Handler v1a.ConfigMapHandlerFunc
}
lockConfigMapControllerMockAddHandler.RLock()
calls = mock.calls.AddHandler
lockConfigMapControllerMockAddHandler.RUnlock()
return calls
}
// Enqueue calls EnqueueFunc.
func (mock *ConfigMapControllerMock) Enqueue(namespace string, name string) {
if mock.EnqueueFunc == nil {
panic("ConfigMapControllerMock.EnqueueFunc: method is nil but ConfigMapController.Enqueue was just called")
}
callInfo := struct {
Namespace string
Name string
}{
Namespace: namespace,
Name: name,
}
lockConfigMapControllerMockEnqueue.Lock()
mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo)
lockConfigMapControllerMockEnqueue.Unlock()
mock.EnqueueFunc(namespace, name)
}
// EnqueueCalls gets all the calls that were made to Enqueue.
// Check the length with:
// len(mockedConfigMapController.EnqueueCalls())
func (mock *ConfigMapControllerMock) EnqueueCalls() []struct {
Namespace string
Name string
} {
var calls []struct {
Namespace string
Name string
}
lockConfigMapControllerMockEnqueue.RLock()
calls = mock.calls.Enqueue
lockConfigMapControllerMockEnqueue.RUnlock()
return calls
}
// EnqueueAfter calls EnqueueAfterFunc.
func (mock *ConfigMapControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) {
if mock.EnqueueAfterFunc == nil {
panic("ConfigMapControllerMock.EnqueueAfterFunc: method is nil but ConfigMapController.EnqueueAfter was just called")
}
callInfo := struct {
Namespace string
Name string
After time.Duration
}{
Namespace: namespace,
Name: name,
After: after,
}
lockConfigMapControllerMockEnqueueAfter.Lock()
mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo)
lockConfigMapControllerMockEnqueueAfter.Unlock()
mock.EnqueueAfterFunc(namespace, name, after)
}
// EnqueueAfterCalls gets all the calls that were made to EnqueueAfter.
// Check the length with:
// len(mockedConfigMapController.EnqueueAfterCalls())
func (mock *ConfigMapControllerMock) EnqueueAfterCalls() []struct {
Namespace string
Name string
After time.Duration
} {
var calls []struct {
Namespace string
Name string
After time.Duration
}
lockConfigMapControllerMockEnqueueAfter.RLock()
calls = mock.calls.EnqueueAfter
lockConfigMapControllerMockEnqueueAfter.RUnlock()
return calls
}
// Generic calls GenericFunc.
func (mock *ConfigMapControllerMock) Generic() controller.GenericController {
if mock.GenericFunc == nil {
panic("ConfigMapControllerMock.GenericFunc: method is nil but ConfigMapController.Generic was just called")
}
callInfo := struct {
}{}
lockConfigMapControllerMockGeneric.Lock()
mock.calls.Generic = append(mock.calls.Generic, callInfo)
lockConfigMapControllerMockGeneric.Unlock()
return mock.GenericFunc()
}
// GenericCalls gets all the calls that were made to Generic.
// Check the length with:
// len(mockedConfigMapController.GenericCalls())
func (mock *ConfigMapControllerMock) GenericCalls() []struct {
} {
var calls []struct {
}
lockConfigMapControllerMockGeneric.RLock()
calls = mock.calls.Generic
lockConfigMapControllerMockGeneric.RUnlock()
return calls
}
// Informer calls InformerFunc.
func (mock *ConfigMapControllerMock) Informer() cache.SharedIndexInformer {
if mock.InformerFunc == nil {
panic("ConfigMapControllerMock.InformerFunc: method is nil but ConfigMapController.Informer was just called")
}
callInfo := struct {
}{}
lockConfigMapControllerMockInformer.Lock()
mock.calls.Informer = append(mock.calls.Informer, callInfo)
lockConfigMapControllerMockInformer.Unlock()
return mock.InformerFunc()
}
// InformerCalls gets all the calls that were made to Informer.
// Check the length with:
// len(mockedConfigMapController.InformerCalls())
func (mock *ConfigMapControllerMock) InformerCalls() []struct {
} {
var calls []struct {
}
lockConfigMapControllerMockInformer.RLock()
calls = mock.calls.Informer
lockConfigMapControllerMockInformer.RUnlock()
return calls
}
// Lister calls ListerFunc.
func (mock *ConfigMapControllerMock) Lister() v1a.ConfigMapLister {
if mock.ListerFunc == nil {
panic("ConfigMapControllerMock.ListerFunc: method is nil but ConfigMapController.Lister was just called")
}
callInfo := struct {
}{}
lockConfigMapControllerMockLister.Lock()
mock.calls.Lister = append(mock.calls.Lister, callInfo)
lockConfigMapControllerMockLister.Unlock()
return mock.ListerFunc()
}
// ListerCalls gets all the calls that were made to Lister.
// Check the length with:
// len(mockedConfigMapController.ListerCalls())
func (mock *ConfigMapControllerMock) ListerCalls() []struct {
} {
var calls []struct {
}
lockConfigMapControllerMockLister.RLock()
calls = mock.calls.Lister
lockConfigMapControllerMockLister.RUnlock()
return calls
}
// Start calls StartFunc.
func (mock *ConfigMapControllerMock) Start(ctx context.Context, threadiness int) error {
if mock.StartFunc == nil {
panic("ConfigMapControllerMock.StartFunc: method is nil but ConfigMapController.Start was just called")
}
callInfo := struct {
Ctx context.Context
Threadiness int
}{
Ctx: ctx,
Threadiness: threadiness,
}
lockConfigMapControllerMockStart.Lock()
mock.calls.Start = append(mock.calls.Start, callInfo)
lockConfigMapControllerMockStart.Unlock()
return mock.StartFunc(ctx, threadiness)
}
// StartCalls gets all the calls that were made to Start.
// Check the length with:
// len(mockedConfigMapController.StartCalls())
func (mock *ConfigMapControllerMock) StartCalls() []struct {
Ctx context.Context
Threadiness int
} {
var calls []struct {
Ctx context.Context
Threadiness int
}
lockConfigMapControllerMockStart.RLock()
calls = mock.calls.Start
lockConfigMapControllerMockStart.RUnlock()
return calls
}
// Sync calls SyncFunc.
func (mock *ConfigMapControllerMock) Sync(ctx context.Context) error {
if mock.SyncFunc == nil {
panic("ConfigMapControllerMock.SyncFunc: method is nil but ConfigMapController.Sync was just called")
}
callInfo := struct {
Ctx context.Context
}{
Ctx: ctx,
}
lockConfigMapControllerMockSync.Lock()
mock.calls.Sync = append(mock.calls.Sync, callInfo)
lockConfigMapControllerMockSync.Unlock()
return mock.SyncFunc(ctx)
}
// SyncCalls gets all the calls that were made to Sync.
// Check the length with:
// len(mockedConfigMapController.SyncCalls())
func (mock *ConfigMapControllerMock) SyncCalls() []struct {
Ctx context.Context
} {
var calls []struct {
Ctx context.Context
}
lockConfigMapControllerMockSync.RLock()
calls = mock.calls.Sync
lockConfigMapControllerMockSync.RUnlock()
return calls
}
var (
lockConfigMapInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
lockConfigMapInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
lockConfigMapInterfaceMockAddClusterScopedHandler sync.RWMutex
lockConfigMapInterfaceMockAddClusterScopedLifecycle sync.RWMutex
lockConfigMapInterfaceMockAddFeatureHandler sync.RWMutex
lockConfigMapInterfaceMockAddFeatureLifecycle sync.RWMutex
lockConfigMapInterfaceMockAddHandler sync.RWMutex
lockConfigMapInterfaceMockAddLifecycle sync.RWMutex
lockConfigMapInterfaceMockController sync.RWMutex
lockConfigMapInterfaceMockCreate sync.RWMutex
lockConfigMapInterfaceMockDelete sync.RWMutex
lockConfigMapInterfaceMockDeleteCollection sync.RWMutex
lockConfigMapInterfaceMockDeleteNamespaced sync.RWMutex
lockConfigMapInterfaceMockGet sync.RWMutex
lockConfigMapInterfaceMockGetNamespaced sync.RWMutex
lockConfigMapInterfaceMockList sync.RWMutex
lockConfigMapInterfaceMockListNamespaced sync.RWMutex
lockConfigMapInterfaceMockObjectClient sync.RWMutex
lockConfigMapInterfaceMockUpdate sync.RWMutex
lockConfigMapInterfaceMockWatch sync.RWMutex
)
// Ensure, that ConfigMapInterfaceMock does implement ConfigMapInterface.
// If this is not the case, regenerate this file with moq.
var _ v1a.ConfigMapInterface = &ConfigMapInterfaceMock{}
// ConfigMapInterfaceMock is a mock implementation of ConfigMapInterface.
//
// func TestSomethingThatUsesConfigMapInterface(t *testing.T) {
//
// // make and configure a mocked ConfigMapInterface
// mockedConfigMapInterface := &ConfigMapInterfaceMock{
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddClusterScopedFeatureHandler method")
// },
// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle) {
// panic("mock out the AddClusterScopedFeatureLifecycle method")
// },
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddClusterScopedHandler method")
// },
// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle) {
// panic("mock out the AddClusterScopedLifecycle method")
// },
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddFeatureHandler method")
// },
// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.ConfigMapLifecycle) {
// panic("mock out the AddFeatureLifecycle method")
// },
// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ConfigMapHandlerFunc) {
// panic("mock out the AddHandler method")
// },
// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ConfigMapLifecycle) {
// panic("mock out the AddLifecycle method")
// },
// ControllerFunc: func() v1a.ConfigMapController {
// panic("mock out the Controller method")
// },
// CreateFunc: func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) {
// panic("mock out the Create method")
// },
// DeleteFunc: func(name string, options *v1b.DeleteOptions) error {
// panic("mock out the Delete method")
// },
// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error {
// panic("mock out the DeleteCollection method")
// },
// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error {
// panic("mock out the DeleteNamespaced method")
// },
// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ConfigMap, error) {
// panic("mock out the Get method")
// },
// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) {
// panic("mock out the GetNamespaced method")
// },
// ListFunc: func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
// panic("mock out the List method")
// },
// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) {
// panic("mock out the ListNamespaced method")
// },
// ObjectClientFunc: func() *objectclient.ObjectClient {
// panic("mock out the ObjectClient method")
// },
// UpdateFunc: func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) {
// panic("mock out the Update method")
// },
// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) {
// panic("mock out the Watch method")
// },
// }
//
// // use mockedConfigMapInterface in code that requires ConfigMapInterface
// // and then make assertions.
//
// }
type ConfigMapInterfaceMock struct {
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.ConfigMapHandlerFunc)
// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle)
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ConfigMapHandlerFunc)
// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle)
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.ConfigMapHandlerFunc)
// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.ConfigMapLifecycle)
// AddHandlerFunc mocks the AddHandler method.
AddHandlerFunc func(ctx context.Context, name string, sync v1a.ConfigMapHandlerFunc)
// AddLifecycleFunc mocks the AddLifecycle method.
AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ConfigMapLifecycle)
// ControllerFunc mocks the Controller method.
ControllerFunc func() v1a.ConfigMapController
// CreateFunc mocks the Create method.
CreateFunc func(in1 *v1.ConfigMap) (*v1.ConfigMap, error)
// DeleteFunc mocks the Delete method.
DeleteFunc func(name string, options *v1b.DeleteOptions) error
// DeleteCollectionFunc mocks the DeleteCollection method.
DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error
// DeleteNamespacedFunc mocks the DeleteNamespaced method.
DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error
// GetFunc mocks the Get method.
GetFunc func(name string, opts v1b.GetOptions) (*v1.ConfigMap, error)
// GetNamespacedFunc mocks the GetNamespaced method.
GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error)
// ListFunc mocks the List method.
ListFunc func(opts v1b.ListOptions) (*v1a.ConfigMapList, error)
// ListNamespacedFunc mocks the ListNamespaced method.
ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error)
// ObjectClientFunc mocks the ObjectClient method.
ObjectClientFunc func() *objectclient.ObjectClient
// UpdateFunc mocks the Update method.
UpdateFunc func(in1 *v1.ConfigMap) (*v1.ConfigMap, error)
// WatchFunc mocks the Watch method.
WatchFunc func(opts v1b.ListOptions) (watch.Interface, error)
// calls tracks calls to the methods.
calls struct {
// AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method.
AddClusterScopedFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Sync is the sync argument value.
Sync v1a.ConfigMapHandlerFunc
}
// AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method.
AddClusterScopedFeatureLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Lifecycle is the lifecycle argument value.
Lifecycle v1a.ConfigMapLifecycle
}
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
AddClusterScopedHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Sync is the sync argument value.
Sync v1a.ConfigMapHandlerFunc
}
// AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method.
AddClusterScopedLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// ClusterName is the clusterName argument value.
ClusterName string
// Lifecycle is the lifecycle argument value.
Lifecycle v1a.ConfigMapLifecycle
}
// AddFeatureHandler holds details about calls to the AddFeatureHandler method.
AddFeatureHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v1a.ConfigMapHandlerFunc
}
// AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method.
AddFeatureLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Enabled is the enabled argument value.
Enabled func() bool
// Name is the name argument value.
Name string
// Lifecycle is the lifecycle argument value.
Lifecycle v1a.ConfigMapLifecycle
}
// AddHandler holds details about calls to the AddHandler method.
AddHandler []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Sync is the sync argument value.
Sync v1a.ConfigMapHandlerFunc
}
// AddLifecycle holds details about calls to the AddLifecycle method.
AddLifecycle []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Name is the name argument value.
Name string
// Lifecycle is the lifecycle argument value.
Lifecycle v1a.ConfigMapLifecycle
}
// Controller holds details about calls to the Controller method.
Controller []struct {
}
// Create holds details about calls to the Create method.
Create []struct {
// In1 is the in1 argument value.
In1 *v1.ConfigMap
}
// Delete holds details about calls to the Delete method.
Delete []struct {
// Name is the name argument value.
Name string
// Options is the options argument value.
Options *v1b.DeleteOptions
}
// DeleteCollection holds details about calls to the DeleteCollection method.
DeleteCollection []struct {
// DeleteOpts is the deleteOpts argument value.
DeleteOpts *v1b.DeleteOptions
// ListOpts is the listOpts argument value.
ListOpts v1b.ListOptions
}
// DeleteNamespaced holds details about calls to the DeleteNamespaced method.
DeleteNamespaced []struct {
// Namespace is the namespace argument value.
Namespace string
// Name is the name argument value.
Name string
// Options is the options argument value.
Options *v1b.DeleteOptions
}
// Get holds details about calls to the Get method.
Get []struct {
// Name is the name argument value.