forked from vmware-archive/atc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_container.go
1462 lines (1348 loc) · 41.2 KB
/
fake_container.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 counterfeiter. DO NOT EDIT.
package workerfakes
import (
"io"
"sync"
"time"
"code.cloudfoundry.org/garden"
"github.com/concourse/atc/worker"
)
type FakeContainer struct {
HandleStub func() string
handleMutex sync.RWMutex
handleArgsForCall []struct{}
handleReturns struct {
result1 string
}
handleReturnsOnCall map[int]struct {
result1 string
}
StopStub func(kill bool) error
stopMutex sync.RWMutex
stopArgsForCall []struct {
kill bool
}
stopReturns struct {
result1 error
}
stopReturnsOnCall map[int]struct {
result1 error
}
InfoStub func() (garden.ContainerInfo, error)
infoMutex sync.RWMutex
infoArgsForCall []struct{}
infoReturns struct {
result1 garden.ContainerInfo
result2 error
}
infoReturnsOnCall map[int]struct {
result1 garden.ContainerInfo
result2 error
}
StreamInStub func(spec garden.StreamInSpec) error
streamInMutex sync.RWMutex
streamInArgsForCall []struct {
spec garden.StreamInSpec
}
streamInReturns struct {
result1 error
}
streamInReturnsOnCall map[int]struct {
result1 error
}
StreamOutStub func(spec garden.StreamOutSpec) (io.ReadCloser, error)
streamOutMutex sync.RWMutex
streamOutArgsForCall []struct {
spec garden.StreamOutSpec
}
streamOutReturns struct {
result1 io.ReadCloser
result2 error
}
streamOutReturnsOnCall map[int]struct {
result1 io.ReadCloser
result2 error
}
CurrentBandwidthLimitsStub func() (garden.BandwidthLimits, error)
currentBandwidthLimitsMutex sync.RWMutex
currentBandwidthLimitsArgsForCall []struct{}
currentBandwidthLimitsReturns struct {
result1 garden.BandwidthLimits
result2 error
}
currentBandwidthLimitsReturnsOnCall map[int]struct {
result1 garden.BandwidthLimits
result2 error
}
CurrentCPULimitsStub func() (garden.CPULimits, error)
currentCPULimitsMutex sync.RWMutex
currentCPULimitsArgsForCall []struct{}
currentCPULimitsReturns struct {
result1 garden.CPULimits
result2 error
}
currentCPULimitsReturnsOnCall map[int]struct {
result1 garden.CPULimits
result2 error
}
CurrentDiskLimitsStub func() (garden.DiskLimits, error)
currentDiskLimitsMutex sync.RWMutex
currentDiskLimitsArgsForCall []struct{}
currentDiskLimitsReturns struct {
result1 garden.DiskLimits
result2 error
}
currentDiskLimitsReturnsOnCall map[int]struct {
result1 garden.DiskLimits
result2 error
}
CurrentMemoryLimitsStub func() (garden.MemoryLimits, error)
currentMemoryLimitsMutex sync.RWMutex
currentMemoryLimitsArgsForCall []struct{}
currentMemoryLimitsReturns struct {
result1 garden.MemoryLimits
result2 error
}
currentMemoryLimitsReturnsOnCall map[int]struct {
result1 garden.MemoryLimits
result2 error
}
NetInStub func(hostPort, containerPort uint32) (uint32, uint32, error)
netInMutex sync.RWMutex
netInArgsForCall []struct {
hostPort uint32
containerPort uint32
}
netInReturns struct {
result1 uint32
result2 uint32
result3 error
}
netInReturnsOnCall map[int]struct {
result1 uint32
result2 uint32
result3 error
}
NetOutStub func(netOutRule garden.NetOutRule) error
netOutMutex sync.RWMutex
netOutArgsForCall []struct {
netOutRule garden.NetOutRule
}
netOutReturns struct {
result1 error
}
netOutReturnsOnCall map[int]struct {
result1 error
}
BulkNetOutStub func(netOutRules []garden.NetOutRule) error
bulkNetOutMutex sync.RWMutex
bulkNetOutArgsForCall []struct {
netOutRules []garden.NetOutRule
}
bulkNetOutReturns struct {
result1 error
}
bulkNetOutReturnsOnCall map[int]struct {
result1 error
}
RunStub func(garden.ProcessSpec, garden.ProcessIO) (garden.Process, error)
runMutex sync.RWMutex
runArgsForCall []struct {
arg1 garden.ProcessSpec
arg2 garden.ProcessIO
}
runReturns struct {
result1 garden.Process
result2 error
}
runReturnsOnCall map[int]struct {
result1 garden.Process
result2 error
}
AttachStub func(processID string, io garden.ProcessIO) (garden.Process, error)
attachMutex sync.RWMutex
attachArgsForCall []struct {
processID string
io garden.ProcessIO
}
attachReturns struct {
result1 garden.Process
result2 error
}
attachReturnsOnCall map[int]struct {
result1 garden.Process
result2 error
}
MetricsStub func() (garden.Metrics, error)
metricsMutex sync.RWMutex
metricsArgsForCall []struct{}
metricsReturns struct {
result1 garden.Metrics
result2 error
}
metricsReturnsOnCall map[int]struct {
result1 garden.Metrics
result2 error
}
SetGraceTimeStub func(graceTime time.Duration) error
setGraceTimeMutex sync.RWMutex
setGraceTimeArgsForCall []struct {
graceTime time.Duration
}
setGraceTimeReturns struct {
result1 error
}
setGraceTimeReturnsOnCall map[int]struct {
result1 error
}
PropertiesStub func() (garden.Properties, error)
propertiesMutex sync.RWMutex
propertiesArgsForCall []struct{}
propertiesReturns struct {
result1 garden.Properties
result2 error
}
propertiesReturnsOnCall map[int]struct {
result1 garden.Properties
result2 error
}
PropertyStub func(name string) (string, error)
propertyMutex sync.RWMutex
propertyArgsForCall []struct {
name string
}
propertyReturns struct {
result1 string
result2 error
}
propertyReturnsOnCall map[int]struct {
result1 string
result2 error
}
SetPropertyStub func(name string, value string) error
setPropertyMutex sync.RWMutex
setPropertyArgsForCall []struct {
name string
value string
}
setPropertyReturns struct {
result1 error
}
setPropertyReturnsOnCall map[int]struct {
result1 error
}
RemovePropertyStub func(name string) error
removePropertyMutex sync.RWMutex
removePropertyArgsForCall []struct {
name string
}
removePropertyReturns struct {
result1 error
}
removePropertyReturnsOnCall map[int]struct {
result1 error
}
DestroyStub func() error
destroyMutex sync.RWMutex
destroyArgsForCall []struct{}
destroyReturns struct {
result1 error
}
destroyReturnsOnCall map[int]struct {
result1 error
}
VolumeMountsStub func() []worker.VolumeMount
volumeMountsMutex sync.RWMutex
volumeMountsArgsForCall []struct{}
volumeMountsReturns struct {
result1 []worker.VolumeMount
}
volumeMountsReturnsOnCall map[int]struct {
result1 []worker.VolumeMount
}
WorkerNameStub func() string
workerNameMutex sync.RWMutex
workerNameArgsForCall []struct{}
workerNameReturns struct {
result1 string
}
workerNameReturnsOnCall map[int]struct {
result1 string
}
MarkAsHijackedStub func() error
markAsHijackedMutex sync.RWMutex
markAsHijackedArgsForCall []struct{}
markAsHijackedReturns struct {
result1 error
}
markAsHijackedReturnsOnCall map[int]struct {
result1 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeContainer) Handle() string {
fake.handleMutex.Lock()
ret, specificReturn := fake.handleReturnsOnCall[len(fake.handleArgsForCall)]
fake.handleArgsForCall = append(fake.handleArgsForCall, struct{}{})
fake.recordInvocation("Handle", []interface{}{})
fake.handleMutex.Unlock()
if fake.HandleStub != nil {
return fake.HandleStub()
}
if specificReturn {
return ret.result1
}
return fake.handleReturns.result1
}
func (fake *FakeContainer) HandleCallCount() int {
fake.handleMutex.RLock()
defer fake.handleMutex.RUnlock()
return len(fake.handleArgsForCall)
}
func (fake *FakeContainer) HandleReturns(result1 string) {
fake.HandleStub = nil
fake.handleReturns = struct {
result1 string
}{result1}
}
func (fake *FakeContainer) HandleReturnsOnCall(i int, result1 string) {
fake.HandleStub = nil
if fake.handleReturnsOnCall == nil {
fake.handleReturnsOnCall = make(map[int]struct {
result1 string
})
}
fake.handleReturnsOnCall[i] = struct {
result1 string
}{result1}
}
func (fake *FakeContainer) Stop(kill bool) error {
fake.stopMutex.Lock()
ret, specificReturn := fake.stopReturnsOnCall[len(fake.stopArgsForCall)]
fake.stopArgsForCall = append(fake.stopArgsForCall, struct {
kill bool
}{kill})
fake.recordInvocation("Stop", []interface{}{kill})
fake.stopMutex.Unlock()
if fake.StopStub != nil {
return fake.StopStub(kill)
}
if specificReturn {
return ret.result1
}
return fake.stopReturns.result1
}
func (fake *FakeContainer) StopCallCount() int {
fake.stopMutex.RLock()
defer fake.stopMutex.RUnlock()
return len(fake.stopArgsForCall)
}
func (fake *FakeContainer) StopArgsForCall(i int) bool {
fake.stopMutex.RLock()
defer fake.stopMutex.RUnlock()
return fake.stopArgsForCall[i].kill
}
func (fake *FakeContainer) StopReturns(result1 error) {
fake.StopStub = nil
fake.stopReturns = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) StopReturnsOnCall(i int, result1 error) {
fake.StopStub = nil
if fake.stopReturnsOnCall == nil {
fake.stopReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.stopReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) Info() (garden.ContainerInfo, error) {
fake.infoMutex.Lock()
ret, specificReturn := fake.infoReturnsOnCall[len(fake.infoArgsForCall)]
fake.infoArgsForCall = append(fake.infoArgsForCall, struct{}{})
fake.recordInvocation("Info", []interface{}{})
fake.infoMutex.Unlock()
if fake.InfoStub != nil {
return fake.InfoStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.infoReturns.result1, fake.infoReturns.result2
}
func (fake *FakeContainer) InfoCallCount() int {
fake.infoMutex.RLock()
defer fake.infoMutex.RUnlock()
return len(fake.infoArgsForCall)
}
func (fake *FakeContainer) InfoReturns(result1 garden.ContainerInfo, result2 error) {
fake.InfoStub = nil
fake.infoReturns = struct {
result1 garden.ContainerInfo
result2 error
}{result1, result2}
}
func (fake *FakeContainer) InfoReturnsOnCall(i int, result1 garden.ContainerInfo, result2 error) {
fake.InfoStub = nil
if fake.infoReturnsOnCall == nil {
fake.infoReturnsOnCall = make(map[int]struct {
result1 garden.ContainerInfo
result2 error
})
}
fake.infoReturnsOnCall[i] = struct {
result1 garden.ContainerInfo
result2 error
}{result1, result2}
}
func (fake *FakeContainer) StreamIn(spec garden.StreamInSpec) error {
fake.streamInMutex.Lock()
ret, specificReturn := fake.streamInReturnsOnCall[len(fake.streamInArgsForCall)]
fake.streamInArgsForCall = append(fake.streamInArgsForCall, struct {
spec garden.StreamInSpec
}{spec})
fake.recordInvocation("StreamIn", []interface{}{spec})
fake.streamInMutex.Unlock()
if fake.StreamInStub != nil {
return fake.StreamInStub(spec)
}
if specificReturn {
return ret.result1
}
return fake.streamInReturns.result1
}
func (fake *FakeContainer) StreamInCallCount() int {
fake.streamInMutex.RLock()
defer fake.streamInMutex.RUnlock()
return len(fake.streamInArgsForCall)
}
func (fake *FakeContainer) StreamInArgsForCall(i int) garden.StreamInSpec {
fake.streamInMutex.RLock()
defer fake.streamInMutex.RUnlock()
return fake.streamInArgsForCall[i].spec
}
func (fake *FakeContainer) StreamInReturns(result1 error) {
fake.StreamInStub = nil
fake.streamInReturns = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) StreamInReturnsOnCall(i int, result1 error) {
fake.StreamInStub = nil
if fake.streamInReturnsOnCall == nil {
fake.streamInReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.streamInReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) StreamOut(spec garden.StreamOutSpec) (io.ReadCloser, error) {
fake.streamOutMutex.Lock()
ret, specificReturn := fake.streamOutReturnsOnCall[len(fake.streamOutArgsForCall)]
fake.streamOutArgsForCall = append(fake.streamOutArgsForCall, struct {
spec garden.StreamOutSpec
}{spec})
fake.recordInvocation("StreamOut", []interface{}{spec})
fake.streamOutMutex.Unlock()
if fake.StreamOutStub != nil {
return fake.StreamOutStub(spec)
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.streamOutReturns.result1, fake.streamOutReturns.result2
}
func (fake *FakeContainer) StreamOutCallCount() int {
fake.streamOutMutex.RLock()
defer fake.streamOutMutex.RUnlock()
return len(fake.streamOutArgsForCall)
}
func (fake *FakeContainer) StreamOutArgsForCall(i int) garden.StreamOutSpec {
fake.streamOutMutex.RLock()
defer fake.streamOutMutex.RUnlock()
return fake.streamOutArgsForCall[i].spec
}
func (fake *FakeContainer) StreamOutReturns(result1 io.ReadCloser, result2 error) {
fake.StreamOutStub = nil
fake.streamOutReturns = struct {
result1 io.ReadCloser
result2 error
}{result1, result2}
}
func (fake *FakeContainer) StreamOutReturnsOnCall(i int, result1 io.ReadCloser, result2 error) {
fake.StreamOutStub = nil
if fake.streamOutReturnsOnCall == nil {
fake.streamOutReturnsOnCall = make(map[int]struct {
result1 io.ReadCloser
result2 error
})
}
fake.streamOutReturnsOnCall[i] = struct {
result1 io.ReadCloser
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentBandwidthLimits() (garden.BandwidthLimits, error) {
fake.currentBandwidthLimitsMutex.Lock()
ret, specificReturn := fake.currentBandwidthLimitsReturnsOnCall[len(fake.currentBandwidthLimitsArgsForCall)]
fake.currentBandwidthLimitsArgsForCall = append(fake.currentBandwidthLimitsArgsForCall, struct{}{})
fake.recordInvocation("CurrentBandwidthLimits", []interface{}{})
fake.currentBandwidthLimitsMutex.Unlock()
if fake.CurrentBandwidthLimitsStub != nil {
return fake.CurrentBandwidthLimitsStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.currentBandwidthLimitsReturns.result1, fake.currentBandwidthLimitsReturns.result2
}
func (fake *FakeContainer) CurrentBandwidthLimitsCallCount() int {
fake.currentBandwidthLimitsMutex.RLock()
defer fake.currentBandwidthLimitsMutex.RUnlock()
return len(fake.currentBandwidthLimitsArgsForCall)
}
func (fake *FakeContainer) CurrentBandwidthLimitsReturns(result1 garden.BandwidthLimits, result2 error) {
fake.CurrentBandwidthLimitsStub = nil
fake.currentBandwidthLimitsReturns = struct {
result1 garden.BandwidthLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentBandwidthLimitsReturnsOnCall(i int, result1 garden.BandwidthLimits, result2 error) {
fake.CurrentBandwidthLimitsStub = nil
if fake.currentBandwidthLimitsReturnsOnCall == nil {
fake.currentBandwidthLimitsReturnsOnCall = make(map[int]struct {
result1 garden.BandwidthLimits
result2 error
})
}
fake.currentBandwidthLimitsReturnsOnCall[i] = struct {
result1 garden.BandwidthLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentCPULimits() (garden.CPULimits, error) {
fake.currentCPULimitsMutex.Lock()
ret, specificReturn := fake.currentCPULimitsReturnsOnCall[len(fake.currentCPULimitsArgsForCall)]
fake.currentCPULimitsArgsForCall = append(fake.currentCPULimitsArgsForCall, struct{}{})
fake.recordInvocation("CurrentCPULimits", []interface{}{})
fake.currentCPULimitsMutex.Unlock()
if fake.CurrentCPULimitsStub != nil {
return fake.CurrentCPULimitsStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.currentCPULimitsReturns.result1, fake.currentCPULimitsReturns.result2
}
func (fake *FakeContainer) CurrentCPULimitsCallCount() int {
fake.currentCPULimitsMutex.RLock()
defer fake.currentCPULimitsMutex.RUnlock()
return len(fake.currentCPULimitsArgsForCall)
}
func (fake *FakeContainer) CurrentCPULimitsReturns(result1 garden.CPULimits, result2 error) {
fake.CurrentCPULimitsStub = nil
fake.currentCPULimitsReturns = struct {
result1 garden.CPULimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentCPULimitsReturnsOnCall(i int, result1 garden.CPULimits, result2 error) {
fake.CurrentCPULimitsStub = nil
if fake.currentCPULimitsReturnsOnCall == nil {
fake.currentCPULimitsReturnsOnCall = make(map[int]struct {
result1 garden.CPULimits
result2 error
})
}
fake.currentCPULimitsReturnsOnCall[i] = struct {
result1 garden.CPULimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentDiskLimits() (garden.DiskLimits, error) {
fake.currentDiskLimitsMutex.Lock()
ret, specificReturn := fake.currentDiskLimitsReturnsOnCall[len(fake.currentDiskLimitsArgsForCall)]
fake.currentDiskLimitsArgsForCall = append(fake.currentDiskLimitsArgsForCall, struct{}{})
fake.recordInvocation("CurrentDiskLimits", []interface{}{})
fake.currentDiskLimitsMutex.Unlock()
if fake.CurrentDiskLimitsStub != nil {
return fake.CurrentDiskLimitsStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.currentDiskLimitsReturns.result1, fake.currentDiskLimitsReturns.result2
}
func (fake *FakeContainer) CurrentDiskLimitsCallCount() int {
fake.currentDiskLimitsMutex.RLock()
defer fake.currentDiskLimitsMutex.RUnlock()
return len(fake.currentDiskLimitsArgsForCall)
}
func (fake *FakeContainer) CurrentDiskLimitsReturns(result1 garden.DiskLimits, result2 error) {
fake.CurrentDiskLimitsStub = nil
fake.currentDiskLimitsReturns = struct {
result1 garden.DiskLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentDiskLimitsReturnsOnCall(i int, result1 garden.DiskLimits, result2 error) {
fake.CurrentDiskLimitsStub = nil
if fake.currentDiskLimitsReturnsOnCall == nil {
fake.currentDiskLimitsReturnsOnCall = make(map[int]struct {
result1 garden.DiskLimits
result2 error
})
}
fake.currentDiskLimitsReturnsOnCall[i] = struct {
result1 garden.DiskLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentMemoryLimits() (garden.MemoryLimits, error) {
fake.currentMemoryLimitsMutex.Lock()
ret, specificReturn := fake.currentMemoryLimitsReturnsOnCall[len(fake.currentMemoryLimitsArgsForCall)]
fake.currentMemoryLimitsArgsForCall = append(fake.currentMemoryLimitsArgsForCall, struct{}{})
fake.recordInvocation("CurrentMemoryLimits", []interface{}{})
fake.currentMemoryLimitsMutex.Unlock()
if fake.CurrentMemoryLimitsStub != nil {
return fake.CurrentMemoryLimitsStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.currentMemoryLimitsReturns.result1, fake.currentMemoryLimitsReturns.result2
}
func (fake *FakeContainer) CurrentMemoryLimitsCallCount() int {
fake.currentMemoryLimitsMutex.RLock()
defer fake.currentMemoryLimitsMutex.RUnlock()
return len(fake.currentMemoryLimitsArgsForCall)
}
func (fake *FakeContainer) CurrentMemoryLimitsReturns(result1 garden.MemoryLimits, result2 error) {
fake.CurrentMemoryLimitsStub = nil
fake.currentMemoryLimitsReturns = struct {
result1 garden.MemoryLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) CurrentMemoryLimitsReturnsOnCall(i int, result1 garden.MemoryLimits, result2 error) {
fake.CurrentMemoryLimitsStub = nil
if fake.currentMemoryLimitsReturnsOnCall == nil {
fake.currentMemoryLimitsReturnsOnCall = make(map[int]struct {
result1 garden.MemoryLimits
result2 error
})
}
fake.currentMemoryLimitsReturnsOnCall[i] = struct {
result1 garden.MemoryLimits
result2 error
}{result1, result2}
}
func (fake *FakeContainer) NetIn(hostPort uint32, containerPort uint32) (uint32, uint32, error) {
fake.netInMutex.Lock()
ret, specificReturn := fake.netInReturnsOnCall[len(fake.netInArgsForCall)]
fake.netInArgsForCall = append(fake.netInArgsForCall, struct {
hostPort uint32
containerPort uint32
}{hostPort, containerPort})
fake.recordInvocation("NetIn", []interface{}{hostPort, containerPort})
fake.netInMutex.Unlock()
if fake.NetInStub != nil {
return fake.NetInStub(hostPort, containerPort)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
return fake.netInReturns.result1, fake.netInReturns.result2, fake.netInReturns.result3
}
func (fake *FakeContainer) NetInCallCount() int {
fake.netInMutex.RLock()
defer fake.netInMutex.RUnlock()
return len(fake.netInArgsForCall)
}
func (fake *FakeContainer) NetInArgsForCall(i int) (uint32, uint32) {
fake.netInMutex.RLock()
defer fake.netInMutex.RUnlock()
return fake.netInArgsForCall[i].hostPort, fake.netInArgsForCall[i].containerPort
}
func (fake *FakeContainer) NetInReturns(result1 uint32, result2 uint32, result3 error) {
fake.NetInStub = nil
fake.netInReturns = struct {
result1 uint32
result2 uint32
result3 error
}{result1, result2, result3}
}
func (fake *FakeContainer) NetInReturnsOnCall(i int, result1 uint32, result2 uint32, result3 error) {
fake.NetInStub = nil
if fake.netInReturnsOnCall == nil {
fake.netInReturnsOnCall = make(map[int]struct {
result1 uint32
result2 uint32
result3 error
})
}
fake.netInReturnsOnCall[i] = struct {
result1 uint32
result2 uint32
result3 error
}{result1, result2, result3}
}
func (fake *FakeContainer) NetOut(netOutRule garden.NetOutRule) error {
fake.netOutMutex.Lock()
ret, specificReturn := fake.netOutReturnsOnCall[len(fake.netOutArgsForCall)]
fake.netOutArgsForCall = append(fake.netOutArgsForCall, struct {
netOutRule garden.NetOutRule
}{netOutRule})
fake.recordInvocation("NetOut", []interface{}{netOutRule})
fake.netOutMutex.Unlock()
if fake.NetOutStub != nil {
return fake.NetOutStub(netOutRule)
}
if specificReturn {
return ret.result1
}
return fake.netOutReturns.result1
}
func (fake *FakeContainer) NetOutCallCount() int {
fake.netOutMutex.RLock()
defer fake.netOutMutex.RUnlock()
return len(fake.netOutArgsForCall)
}
func (fake *FakeContainer) NetOutArgsForCall(i int) garden.NetOutRule {
fake.netOutMutex.RLock()
defer fake.netOutMutex.RUnlock()
return fake.netOutArgsForCall[i].netOutRule
}
func (fake *FakeContainer) NetOutReturns(result1 error) {
fake.NetOutStub = nil
fake.netOutReturns = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) NetOutReturnsOnCall(i int, result1 error) {
fake.NetOutStub = nil
if fake.netOutReturnsOnCall == nil {
fake.netOutReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.netOutReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) BulkNetOut(netOutRules []garden.NetOutRule) error {
var netOutRulesCopy []garden.NetOutRule
if netOutRules != nil {
netOutRulesCopy = make([]garden.NetOutRule, len(netOutRules))
copy(netOutRulesCopy, netOutRules)
}
fake.bulkNetOutMutex.Lock()
ret, specificReturn := fake.bulkNetOutReturnsOnCall[len(fake.bulkNetOutArgsForCall)]
fake.bulkNetOutArgsForCall = append(fake.bulkNetOutArgsForCall, struct {
netOutRules []garden.NetOutRule
}{netOutRulesCopy})
fake.recordInvocation("BulkNetOut", []interface{}{netOutRulesCopy})
fake.bulkNetOutMutex.Unlock()
if fake.BulkNetOutStub != nil {
return fake.BulkNetOutStub(netOutRules)
}
if specificReturn {
return ret.result1
}
return fake.bulkNetOutReturns.result1
}
func (fake *FakeContainer) BulkNetOutCallCount() int {
fake.bulkNetOutMutex.RLock()
defer fake.bulkNetOutMutex.RUnlock()
return len(fake.bulkNetOutArgsForCall)
}
func (fake *FakeContainer) BulkNetOutArgsForCall(i int) []garden.NetOutRule {
fake.bulkNetOutMutex.RLock()
defer fake.bulkNetOutMutex.RUnlock()
return fake.bulkNetOutArgsForCall[i].netOutRules
}
func (fake *FakeContainer) BulkNetOutReturns(result1 error) {
fake.BulkNetOutStub = nil
fake.bulkNetOutReturns = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) BulkNetOutReturnsOnCall(i int, result1 error) {
fake.BulkNetOutStub = nil
if fake.bulkNetOutReturnsOnCall == nil {
fake.bulkNetOutReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.bulkNetOutReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *FakeContainer) Run(arg1 garden.ProcessSpec, arg2 garden.ProcessIO) (garden.Process, error) {
fake.runMutex.Lock()
ret, specificReturn := fake.runReturnsOnCall[len(fake.runArgsForCall)]
fake.runArgsForCall = append(fake.runArgsForCall, struct {
arg1 garden.ProcessSpec
arg2 garden.ProcessIO
}{arg1, arg2})
fake.recordInvocation("Run", []interface{}{arg1, arg2})
fake.runMutex.Unlock()
if fake.RunStub != nil {
return fake.RunStub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.runReturns.result1, fake.runReturns.result2
}
func (fake *FakeContainer) RunCallCount() int {
fake.runMutex.RLock()
defer fake.runMutex.RUnlock()
return len(fake.runArgsForCall)
}
func (fake *FakeContainer) RunArgsForCall(i int) (garden.ProcessSpec, garden.ProcessIO) {
fake.runMutex.RLock()
defer fake.runMutex.RUnlock()
return fake.runArgsForCall[i].arg1, fake.runArgsForCall[i].arg2
}
func (fake *FakeContainer) RunReturns(result1 garden.Process, result2 error) {
fake.RunStub = nil
fake.runReturns = struct {
result1 garden.Process
result2 error
}{result1, result2}
}
func (fake *FakeContainer) RunReturnsOnCall(i int, result1 garden.Process, result2 error) {
fake.RunStub = nil
if fake.runReturnsOnCall == nil {
fake.runReturnsOnCall = make(map[int]struct {
result1 garden.Process
result2 error
})
}
fake.runReturnsOnCall[i] = struct {
result1 garden.Process
result2 error
}{result1, result2}
}
func (fake *FakeContainer) Attach(processID string, io garden.ProcessIO) (garden.Process, error) {
fake.attachMutex.Lock()
ret, specificReturn := fake.attachReturnsOnCall[len(fake.attachArgsForCall)]
fake.attachArgsForCall = append(fake.attachArgsForCall, struct {
processID string
io garden.ProcessIO
}{processID, io})
fake.recordInvocation("Attach", []interface{}{processID, io})
fake.attachMutex.Unlock()
if fake.AttachStub != nil {
return fake.AttachStub(processID, io)
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.attachReturns.result1, fake.attachReturns.result2
}
func (fake *FakeContainer) AttachCallCount() int {
fake.attachMutex.RLock()
defer fake.attachMutex.RUnlock()
return len(fake.attachArgsForCall)
}
func (fake *FakeContainer) AttachArgsForCall(i int) (string, garden.ProcessIO) {
fake.attachMutex.RLock()
defer fake.attachMutex.RUnlock()
return fake.attachArgsForCall[i].processID, fake.attachArgsForCall[i].io
}
func (fake *FakeContainer) AttachReturns(result1 garden.Process, result2 error) {
fake.AttachStub = nil
fake.attachReturns = struct {
result1 garden.Process
result2 error
}{result1, result2}
}
func (fake *FakeContainer) AttachReturnsOnCall(i int, result1 garden.Process, result2 error) {
fake.AttachStub = nil
if fake.attachReturnsOnCall == nil {
fake.attachReturnsOnCall = make(map[int]struct {
result1 garden.Process
result2 error
})
}
fake.attachReturnsOnCall[i] = struct {
result1 garden.Process
result2 error
}{result1, result2}
}
func (fake *FakeContainer) Metrics() (garden.Metrics, error) {
fake.metricsMutex.Lock()
ret, specificReturn := fake.metricsReturnsOnCall[len(fake.metricsArgsForCall)]
fake.metricsArgsForCall = append(fake.metricsArgsForCall, struct{}{})
fake.recordInvocation("Metrics", []interface{}{})
fake.metricsMutex.Unlock()
if fake.MetricsStub != nil {
return fake.MetricsStub()
}
if specificReturn {
return ret.result1, ret.result2
}
return fake.metricsReturns.result1, fake.metricsReturns.result2
}
func (fake *FakeContainer) MetricsCallCount() int {
fake.metricsMutex.RLock()
defer fake.metricsMutex.RUnlock()
return len(fake.metricsArgsForCall)
}
func (fake *FakeContainer) MetricsReturns(result1 garden.Metrics, result2 error) {
fake.MetricsStub = nil
fake.metricsReturns = struct {
result1 garden.Metrics
result2 error
}{result1, result2}
}
func (fake *FakeContainer) MetricsReturnsOnCall(i int, result1 garden.Metrics, result2 error) {
fake.MetricsStub = nil
if fake.metricsReturnsOnCall == nil {
fake.metricsReturnsOnCall = make(map[int]struct {
result1 garden.Metrics
result2 error
})
}
fake.metricsReturnsOnCall[i] = struct {
result1 garden.Metrics
result2 error
}{result1, result2}
}
func (fake *FakeContainer) SetGraceTime(graceTime time.Duration) error {
fake.setGraceTimeMutex.Lock()
ret, specificReturn := fake.setGraceTimeReturnsOnCall[len(fake.setGraceTimeArgsForCall)]
fake.setGraceTimeArgsForCall = append(fake.setGraceTimeArgsForCall, struct {
graceTime time.Duration
}{graceTime})
fake.recordInvocation("SetGraceTime", []interface{}{graceTime})
fake.setGraceTimeMutex.Unlock()