/
phaseitem_mock.go
1121 lines (1034 loc) · 38.1 KB
/
phaseitem_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 fake
import (
apilifecycle "github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1"
apicommon "github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1/common"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"sync"
"time"
)
// PhaseItemMock is a mock implementation of interfaces.PhaseItem.
//
// func TestSomethingThatUsesPhaseItem(t *testing.T) {
//
// // make and configure a mocked interfaces.PhaseItem
// mockedPhaseItem := &PhaseItemMock{
// CompleteFunc: func() {
// panic("mock out the Complete method")
// },
// DeprecateRemainingPhasesFunc: func(phase apicommon.KeptnPhaseType) {
// panic("mock out the DeprecateRemainingPhases method")
// },
// GenerateEvaluationFunc: func(evaluationDefinition apilifecycle.KeptnEvaluationDefinition, checkType apicommon.CheckType) apilifecycle.KeptnEvaluation {
// panic("mock out the GenerateEvaluation method")
// },
// GenerateTaskFunc: func(taskDefinition apilifecycle.KeptnTaskDefinition, checkType apicommon.CheckType) apilifecycle.KeptnTask {
// panic("mock out the GenerateTask method")
// },
// GetAppNameFunc: func() string {
// panic("mock out the GetAppName method")
// },
// GetCurrentPhaseFunc: func() string {
// panic("mock out the GetCurrentPhase method")
// },
// GetEndTimeFunc: func() time.Time {
// panic("mock out the GetEndTime method")
// },
// GetNamespaceFunc: func() string {
// panic("mock out the GetNamespace method")
// },
// GetParentNameFunc: func() string {
// panic("mock out the GetParentName method")
// },
// GetPostDeploymentEvaluationTaskStatusFunc: func() []apilifecycle.ItemStatus {
// panic("mock out the GetPostDeploymentEvaluationTaskStatus method")
// },
// GetPostDeploymentEvaluationsFunc: func() []string {
// panic("mock out the GetPostDeploymentEvaluations method")
// },
// GetPostDeploymentTaskStatusFunc: func() []apilifecycle.ItemStatus {
// panic("mock out the GetPostDeploymentTaskStatus method")
// },
// GetPostDeploymentTasksFunc: func() []string {
// panic("mock out the GetPostDeploymentTasks method")
// },
// GetPreDeploymentEvaluationTaskStatusFunc: func() []apilifecycle.ItemStatus {
// panic("mock out the GetPreDeploymentEvaluationTaskStatus method")
// },
// GetPreDeploymentEvaluationsFunc: func() []string {
// panic("mock out the GetPreDeploymentEvaluations method")
// },
// GetPreDeploymentTaskStatusFunc: func() []apilifecycle.ItemStatus {
// panic("mock out the GetPreDeploymentTaskStatus method")
// },
// GetPreDeploymentTasksFunc: func() []string {
// panic("mock out the GetPreDeploymentTasks method")
// },
// GetPreviousVersionFunc: func() string {
// panic("mock out the GetPreviousVersion method")
// },
// GetPromotionTaskStatusFunc: func() []apilifecycle.ItemStatus {
// panic("mock out the GetPromotionTaskStatus method")
// },
// GetPromotionTasksFunc: func() []string {
// panic("mock out the GetPromotionTasks method")
// },
// GetSpanAttributesFunc: func() []attribute.KeyValue {
// panic("mock out the GetSpanAttributes method")
// },
// GetStartTimeFunc: func() time.Time {
// panic("mock out the GetStartTime method")
// },
// GetStateFunc: func() apicommon.KeptnState {
// panic("mock out the GetState method")
// },
// GetVersionFunc: func() string {
// panic("mock out the GetVersion method")
// },
// IsEndTimeSetFunc: func() bool {
// panic("mock out the IsEndTimeSet method")
// },
// SetCurrentPhaseFunc: func(s string) {
// panic("mock out the SetCurrentPhase method")
// },
// SetSpanAttributesFunc: func(span trace.Span) {
// panic("mock out the SetSpanAttributes method")
// },
// SetStateFunc: func(keptnState apicommon.KeptnState) {
// panic("mock out the SetState method")
// },
// }
//
// // use mockedPhaseItem in code that requires interfaces.PhaseItem
// // and then make assertions.
//
// }
type PhaseItemMock struct {
// CompleteFunc mocks the Complete method.
CompleteFunc func()
// DeprecateRemainingPhasesFunc mocks the DeprecateRemainingPhases method.
DeprecateRemainingPhasesFunc func(phase apicommon.KeptnPhaseType)
// GenerateEvaluationFunc mocks the GenerateEvaluation method.
GenerateEvaluationFunc func(evaluationDefinition apilifecycle.KeptnEvaluationDefinition, checkType apicommon.CheckType) apilifecycle.KeptnEvaluation
// GenerateTaskFunc mocks the GenerateTask method.
GenerateTaskFunc func(taskDefinition apilifecycle.KeptnTaskDefinition, checkType apicommon.CheckType) apilifecycle.KeptnTask
// GetAppNameFunc mocks the GetAppName method.
GetAppNameFunc func() string
// GetCurrentPhaseFunc mocks the GetCurrentPhase method.
GetCurrentPhaseFunc func() string
// GetEndTimeFunc mocks the GetEndTime method.
GetEndTimeFunc func() time.Time
// GetNamespaceFunc mocks the GetNamespace method.
GetNamespaceFunc func() string
// GetParentNameFunc mocks the GetParentName method.
GetParentNameFunc func() string
// GetPostDeploymentEvaluationTaskStatusFunc mocks the GetPostDeploymentEvaluationTaskStatus method.
GetPostDeploymentEvaluationTaskStatusFunc func() []apilifecycle.ItemStatus
// GetPostDeploymentEvaluationsFunc mocks the GetPostDeploymentEvaluations method.
GetPostDeploymentEvaluationsFunc func() []string
// GetPostDeploymentTaskStatusFunc mocks the GetPostDeploymentTaskStatus method.
GetPostDeploymentTaskStatusFunc func() []apilifecycle.ItemStatus
// GetPostDeploymentTasksFunc mocks the GetPostDeploymentTasks method.
GetPostDeploymentTasksFunc func() []string
// GetPreDeploymentEvaluationTaskStatusFunc mocks the GetPreDeploymentEvaluationTaskStatus method.
GetPreDeploymentEvaluationTaskStatusFunc func() []apilifecycle.ItemStatus
// GetPreDeploymentEvaluationsFunc mocks the GetPreDeploymentEvaluations method.
GetPreDeploymentEvaluationsFunc func() []string
// GetPreDeploymentTaskStatusFunc mocks the GetPreDeploymentTaskStatus method.
GetPreDeploymentTaskStatusFunc func() []apilifecycle.ItemStatus
// GetPreDeploymentTasksFunc mocks the GetPreDeploymentTasks method.
GetPreDeploymentTasksFunc func() []string
// GetPreviousVersionFunc mocks the GetPreviousVersion method.
GetPreviousVersionFunc func() string
// GetPromotionTaskStatusFunc mocks the GetPromotionTaskStatus method.
GetPromotionTaskStatusFunc func() []apilifecycle.ItemStatus
// GetPromotionTasksFunc mocks the GetPromotionTasks method.
GetPromotionTasksFunc func() []string
// GetSpanAttributesFunc mocks the GetSpanAttributes method.
GetSpanAttributesFunc func() []attribute.KeyValue
// GetStartTimeFunc mocks the GetStartTime method.
GetStartTimeFunc func() time.Time
// GetStateFunc mocks the GetState method.
GetStateFunc func() apicommon.KeptnState
// GetVersionFunc mocks the GetVersion method.
GetVersionFunc func() string
// IsEndTimeSetFunc mocks the IsEndTimeSet method.
IsEndTimeSetFunc func() bool
// SetCurrentPhaseFunc mocks the SetCurrentPhase method.
SetCurrentPhaseFunc func(s string)
// SetSpanAttributesFunc mocks the SetSpanAttributes method.
SetSpanAttributesFunc func(span trace.Span)
// SetStateFunc mocks the SetState method.
SetStateFunc func(keptnState apicommon.KeptnState)
// calls tracks calls to the methods.
calls struct {
// Complete holds details about calls to the Complete method.
Complete []struct {
}
// DeprecateRemainingPhases holds details about calls to the DeprecateRemainingPhases method.
DeprecateRemainingPhases []struct {
// Phase is the phase argument value.
Phase apicommon.KeptnPhaseType
}
// GenerateEvaluation holds details about calls to the GenerateEvaluation method.
GenerateEvaluation []struct {
// EvaluationDefinition is the evaluationDefinition argument value.
EvaluationDefinition apilifecycle.KeptnEvaluationDefinition
// CheckType is the checkType argument value.
CheckType apicommon.CheckType
}
// GenerateTask holds details about calls to the GenerateTask method.
GenerateTask []struct {
// TaskDefinition is the taskDefinition argument value.
TaskDefinition apilifecycle.KeptnTaskDefinition
// CheckType is the checkType argument value.
CheckType apicommon.CheckType
}
// GetAppName holds details about calls to the GetAppName method.
GetAppName []struct {
}
// GetCurrentPhase holds details about calls to the GetCurrentPhase method.
GetCurrentPhase []struct {
}
// GetEndTime holds details about calls to the GetEndTime method.
GetEndTime []struct {
}
// GetNamespace holds details about calls to the GetNamespace method.
GetNamespace []struct {
}
// GetParentName holds details about calls to the GetParentName method.
GetParentName []struct {
}
// GetPostDeploymentEvaluationTaskStatus holds details about calls to the GetPostDeploymentEvaluationTaskStatus method.
GetPostDeploymentEvaluationTaskStatus []struct {
}
// GetPostDeploymentEvaluations holds details about calls to the GetPostDeploymentEvaluations method.
GetPostDeploymentEvaluations []struct {
}
// GetPostDeploymentTaskStatus holds details about calls to the GetPostDeploymentTaskStatus method.
GetPostDeploymentTaskStatus []struct {
}
// GetPostDeploymentTasks holds details about calls to the GetPostDeploymentTasks method.
GetPostDeploymentTasks []struct {
}
// GetPreDeploymentEvaluationTaskStatus holds details about calls to the GetPreDeploymentEvaluationTaskStatus method.
GetPreDeploymentEvaluationTaskStatus []struct {
}
// GetPreDeploymentEvaluations holds details about calls to the GetPreDeploymentEvaluations method.
GetPreDeploymentEvaluations []struct {
}
// GetPreDeploymentTaskStatus holds details about calls to the GetPreDeploymentTaskStatus method.
GetPreDeploymentTaskStatus []struct {
}
// GetPreDeploymentTasks holds details about calls to the GetPreDeploymentTasks method.
GetPreDeploymentTasks []struct {
}
// GetPreviousVersion holds details about calls to the GetPreviousVersion method.
GetPreviousVersion []struct {
}
// GetPromotionTaskStatus holds details about calls to the GetPromotionTaskStatus method.
GetPromotionTaskStatus []struct {
}
// GetPromotionTasks holds details about calls to the GetPromotionTasks method.
GetPromotionTasks []struct {
}
// GetSpanAttributes holds details about calls to the GetSpanAttributes method.
GetSpanAttributes []struct {
}
// GetStartTime holds details about calls to the GetStartTime method.
GetStartTime []struct {
}
// GetState holds details about calls to the GetState method.
GetState []struct {
}
// GetVersion holds details about calls to the GetVersion method.
GetVersion []struct {
}
// IsEndTimeSet holds details about calls to the IsEndTimeSet method.
IsEndTimeSet []struct {
}
// SetCurrentPhase holds details about calls to the SetCurrentPhase method.
SetCurrentPhase []struct {
// S is the s argument value.
S string
}
// SetSpanAttributes holds details about calls to the SetSpanAttributes method.
SetSpanAttributes []struct {
// Span is the span argument value.
Span trace.Span
}
// SetState holds details about calls to the SetState method.
SetState []struct {
// KeptnState is the keptnState argument value.
KeptnState apicommon.KeptnState
}
}
lockComplete sync.RWMutex
lockDeprecateRemainingPhases sync.RWMutex
lockGenerateEvaluation sync.RWMutex
lockGenerateTask sync.RWMutex
lockGetAppName sync.RWMutex
lockGetCurrentPhase sync.RWMutex
lockGetEndTime sync.RWMutex
lockGetNamespace sync.RWMutex
lockGetParentName sync.RWMutex
lockGetPostDeploymentEvaluationTaskStatus sync.RWMutex
lockGetPostDeploymentEvaluations sync.RWMutex
lockGetPostDeploymentTaskStatus sync.RWMutex
lockGetPostDeploymentTasks sync.RWMutex
lockGetPreDeploymentEvaluationTaskStatus sync.RWMutex
lockGetPreDeploymentEvaluations sync.RWMutex
lockGetPreDeploymentTaskStatus sync.RWMutex
lockGetPreDeploymentTasks sync.RWMutex
lockGetPreviousVersion sync.RWMutex
lockGetPromotionTaskStatus sync.RWMutex
lockGetPromotionTasks sync.RWMutex
lockGetSpanAttributes sync.RWMutex
lockGetStartTime sync.RWMutex
lockGetState sync.RWMutex
lockGetVersion sync.RWMutex
lockIsEndTimeSet sync.RWMutex
lockSetCurrentPhase sync.RWMutex
lockSetSpanAttributes sync.RWMutex
lockSetState sync.RWMutex
}
// Complete calls CompleteFunc.
func (mock *PhaseItemMock) Complete() {
if mock.CompleteFunc == nil {
panic("PhaseItemMock.CompleteFunc: method is nil but PhaseItem.Complete was just called")
}
callInfo := struct {
}{}
mock.lockComplete.Lock()
mock.calls.Complete = append(mock.calls.Complete, callInfo)
mock.lockComplete.Unlock()
mock.CompleteFunc()
}
// CompleteCalls gets all the calls that were made to Complete.
// Check the length with:
//
// len(mockedPhaseItem.CompleteCalls())
func (mock *PhaseItemMock) CompleteCalls() []struct {
} {
var calls []struct {
}
mock.lockComplete.RLock()
calls = mock.calls.Complete
mock.lockComplete.RUnlock()
return calls
}
// DeprecateRemainingPhases calls DeprecateRemainingPhasesFunc.
func (mock *PhaseItemMock) DeprecateRemainingPhases(phase apicommon.KeptnPhaseType) {
if mock.DeprecateRemainingPhasesFunc == nil {
panic("PhaseItemMock.DeprecateRemainingPhasesFunc: method is nil but PhaseItem.DeprecateRemainingPhases was just called")
}
callInfo := struct {
Phase apicommon.KeptnPhaseType
}{
Phase: phase,
}
mock.lockDeprecateRemainingPhases.Lock()
mock.calls.DeprecateRemainingPhases = append(mock.calls.DeprecateRemainingPhases, callInfo)
mock.lockDeprecateRemainingPhases.Unlock()
mock.DeprecateRemainingPhasesFunc(phase)
}
// DeprecateRemainingPhasesCalls gets all the calls that were made to DeprecateRemainingPhases.
// Check the length with:
//
// len(mockedPhaseItem.DeprecateRemainingPhasesCalls())
func (mock *PhaseItemMock) DeprecateRemainingPhasesCalls() []struct {
Phase apicommon.KeptnPhaseType
} {
var calls []struct {
Phase apicommon.KeptnPhaseType
}
mock.lockDeprecateRemainingPhases.RLock()
calls = mock.calls.DeprecateRemainingPhases
mock.lockDeprecateRemainingPhases.RUnlock()
return calls
}
// GenerateEvaluation calls GenerateEvaluationFunc.
func (mock *PhaseItemMock) GenerateEvaluation(evaluationDefinition apilifecycle.KeptnEvaluationDefinition, checkType apicommon.CheckType) apilifecycle.KeptnEvaluation {
if mock.GenerateEvaluationFunc == nil {
panic("PhaseItemMock.GenerateEvaluationFunc: method is nil but PhaseItem.GenerateEvaluation was just called")
}
callInfo := struct {
EvaluationDefinition apilifecycle.KeptnEvaluationDefinition
CheckType apicommon.CheckType
}{
EvaluationDefinition: evaluationDefinition,
CheckType: checkType,
}
mock.lockGenerateEvaluation.Lock()
mock.calls.GenerateEvaluation = append(mock.calls.GenerateEvaluation, callInfo)
mock.lockGenerateEvaluation.Unlock()
return mock.GenerateEvaluationFunc(evaluationDefinition, checkType)
}
// GenerateEvaluationCalls gets all the calls that were made to GenerateEvaluation.
// Check the length with:
//
// len(mockedPhaseItem.GenerateEvaluationCalls())
func (mock *PhaseItemMock) GenerateEvaluationCalls() []struct {
EvaluationDefinition apilifecycle.KeptnEvaluationDefinition
CheckType apicommon.CheckType
} {
var calls []struct {
EvaluationDefinition apilifecycle.KeptnEvaluationDefinition
CheckType apicommon.CheckType
}
mock.lockGenerateEvaluation.RLock()
calls = mock.calls.GenerateEvaluation
mock.lockGenerateEvaluation.RUnlock()
return calls
}
// GenerateTask calls GenerateTaskFunc.
func (mock *PhaseItemMock) GenerateTask(taskDefinition apilifecycle.KeptnTaskDefinition, checkType apicommon.CheckType) apilifecycle.KeptnTask {
if mock.GenerateTaskFunc == nil {
panic("PhaseItemMock.GenerateTaskFunc: method is nil but PhaseItem.GenerateTask was just called")
}
callInfo := struct {
TaskDefinition apilifecycle.KeptnTaskDefinition
CheckType apicommon.CheckType
}{
TaskDefinition: taskDefinition,
CheckType: checkType,
}
mock.lockGenerateTask.Lock()
mock.calls.GenerateTask = append(mock.calls.GenerateTask, callInfo)
mock.lockGenerateTask.Unlock()
return mock.GenerateTaskFunc(taskDefinition, checkType)
}
// GenerateTaskCalls gets all the calls that were made to GenerateTask.
// Check the length with:
//
// len(mockedPhaseItem.GenerateTaskCalls())
func (mock *PhaseItemMock) GenerateTaskCalls() []struct {
TaskDefinition apilifecycle.KeptnTaskDefinition
CheckType apicommon.CheckType
} {
var calls []struct {
TaskDefinition apilifecycle.KeptnTaskDefinition
CheckType apicommon.CheckType
}
mock.lockGenerateTask.RLock()
calls = mock.calls.GenerateTask
mock.lockGenerateTask.RUnlock()
return calls
}
// GetAppName calls GetAppNameFunc.
func (mock *PhaseItemMock) GetAppName() string {
if mock.GetAppNameFunc == nil {
panic("PhaseItemMock.GetAppNameFunc: method is nil but PhaseItem.GetAppName was just called")
}
callInfo := struct {
}{}
mock.lockGetAppName.Lock()
mock.calls.GetAppName = append(mock.calls.GetAppName, callInfo)
mock.lockGetAppName.Unlock()
return mock.GetAppNameFunc()
}
// GetAppNameCalls gets all the calls that were made to GetAppName.
// Check the length with:
//
// len(mockedPhaseItem.GetAppNameCalls())
func (mock *PhaseItemMock) GetAppNameCalls() []struct {
} {
var calls []struct {
}
mock.lockGetAppName.RLock()
calls = mock.calls.GetAppName
mock.lockGetAppName.RUnlock()
return calls
}
// GetCurrentPhase calls GetCurrentPhaseFunc.
func (mock *PhaseItemMock) GetCurrentPhase() string {
if mock.GetCurrentPhaseFunc == nil {
panic("PhaseItemMock.GetCurrentPhaseFunc: method is nil but PhaseItem.GetCurrentPhase was just called")
}
callInfo := struct {
}{}
mock.lockGetCurrentPhase.Lock()
mock.calls.GetCurrentPhase = append(mock.calls.GetCurrentPhase, callInfo)
mock.lockGetCurrentPhase.Unlock()
return mock.GetCurrentPhaseFunc()
}
// GetCurrentPhaseCalls gets all the calls that were made to GetCurrentPhase.
// Check the length with:
//
// len(mockedPhaseItem.GetCurrentPhaseCalls())
func (mock *PhaseItemMock) GetCurrentPhaseCalls() []struct {
} {
var calls []struct {
}
mock.lockGetCurrentPhase.RLock()
calls = mock.calls.GetCurrentPhase
mock.lockGetCurrentPhase.RUnlock()
return calls
}
// GetEndTime calls GetEndTimeFunc.
func (mock *PhaseItemMock) GetEndTime() time.Time {
if mock.GetEndTimeFunc == nil {
panic("PhaseItemMock.GetEndTimeFunc: method is nil but PhaseItem.GetEndTime was just called")
}
callInfo := struct {
}{}
mock.lockGetEndTime.Lock()
mock.calls.GetEndTime = append(mock.calls.GetEndTime, callInfo)
mock.lockGetEndTime.Unlock()
return mock.GetEndTimeFunc()
}
// GetEndTimeCalls gets all the calls that were made to GetEndTime.
// Check the length with:
//
// len(mockedPhaseItem.GetEndTimeCalls())
func (mock *PhaseItemMock) GetEndTimeCalls() []struct {
} {
var calls []struct {
}
mock.lockGetEndTime.RLock()
calls = mock.calls.GetEndTime
mock.lockGetEndTime.RUnlock()
return calls
}
// GetNamespace calls GetNamespaceFunc.
func (mock *PhaseItemMock) GetNamespace() string {
if mock.GetNamespaceFunc == nil {
panic("PhaseItemMock.GetNamespaceFunc: method is nil but PhaseItem.GetNamespace was just called")
}
callInfo := struct {
}{}
mock.lockGetNamespace.Lock()
mock.calls.GetNamespace = append(mock.calls.GetNamespace, callInfo)
mock.lockGetNamespace.Unlock()
return mock.GetNamespaceFunc()
}
// GetNamespaceCalls gets all the calls that were made to GetNamespace.
// Check the length with:
//
// len(mockedPhaseItem.GetNamespaceCalls())
func (mock *PhaseItemMock) GetNamespaceCalls() []struct {
} {
var calls []struct {
}
mock.lockGetNamespace.RLock()
calls = mock.calls.GetNamespace
mock.lockGetNamespace.RUnlock()
return calls
}
// GetParentName calls GetParentNameFunc.
func (mock *PhaseItemMock) GetParentName() string {
if mock.GetParentNameFunc == nil {
panic("PhaseItemMock.GetParentNameFunc: method is nil but PhaseItem.GetParentName was just called")
}
callInfo := struct {
}{}
mock.lockGetParentName.Lock()
mock.calls.GetParentName = append(mock.calls.GetParentName, callInfo)
mock.lockGetParentName.Unlock()
return mock.GetParentNameFunc()
}
// GetParentNameCalls gets all the calls that were made to GetParentName.
// Check the length with:
//
// len(mockedPhaseItem.GetParentNameCalls())
func (mock *PhaseItemMock) GetParentNameCalls() []struct {
} {
var calls []struct {
}
mock.lockGetParentName.RLock()
calls = mock.calls.GetParentName
mock.lockGetParentName.RUnlock()
return calls
}
// GetPostDeploymentEvaluationTaskStatus calls GetPostDeploymentEvaluationTaskStatusFunc.
func (mock *PhaseItemMock) GetPostDeploymentEvaluationTaskStatus() []apilifecycle.ItemStatus {
if mock.GetPostDeploymentEvaluationTaskStatusFunc == nil {
panic("PhaseItemMock.GetPostDeploymentEvaluationTaskStatusFunc: method is nil but PhaseItem.GetPostDeploymentEvaluationTaskStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetPostDeploymentEvaluationTaskStatus.Lock()
mock.calls.GetPostDeploymentEvaluationTaskStatus = append(mock.calls.GetPostDeploymentEvaluationTaskStatus, callInfo)
mock.lockGetPostDeploymentEvaluationTaskStatus.Unlock()
return mock.GetPostDeploymentEvaluationTaskStatusFunc()
}
// GetPostDeploymentEvaluationTaskStatusCalls gets all the calls that were made to GetPostDeploymentEvaluationTaskStatus.
// Check the length with:
//
// len(mockedPhaseItem.GetPostDeploymentEvaluationTaskStatusCalls())
func (mock *PhaseItemMock) GetPostDeploymentEvaluationTaskStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPostDeploymentEvaluationTaskStatus.RLock()
calls = mock.calls.GetPostDeploymentEvaluationTaskStatus
mock.lockGetPostDeploymentEvaluationTaskStatus.RUnlock()
return calls
}
// GetPostDeploymentEvaluations calls GetPostDeploymentEvaluationsFunc.
func (mock *PhaseItemMock) GetPostDeploymentEvaluations() []string {
if mock.GetPostDeploymentEvaluationsFunc == nil {
panic("PhaseItemMock.GetPostDeploymentEvaluationsFunc: method is nil but PhaseItem.GetPostDeploymentEvaluations was just called")
}
callInfo := struct {
}{}
mock.lockGetPostDeploymentEvaluations.Lock()
mock.calls.GetPostDeploymentEvaluations = append(mock.calls.GetPostDeploymentEvaluations, callInfo)
mock.lockGetPostDeploymentEvaluations.Unlock()
return mock.GetPostDeploymentEvaluationsFunc()
}
// GetPostDeploymentEvaluationsCalls gets all the calls that were made to GetPostDeploymentEvaluations.
// Check the length with:
//
// len(mockedPhaseItem.GetPostDeploymentEvaluationsCalls())
func (mock *PhaseItemMock) GetPostDeploymentEvaluationsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPostDeploymentEvaluations.RLock()
calls = mock.calls.GetPostDeploymentEvaluations
mock.lockGetPostDeploymentEvaluations.RUnlock()
return calls
}
// GetPostDeploymentTaskStatus calls GetPostDeploymentTaskStatusFunc.
func (mock *PhaseItemMock) GetPostDeploymentTaskStatus() []apilifecycle.ItemStatus {
if mock.GetPostDeploymentTaskStatusFunc == nil {
panic("PhaseItemMock.GetPostDeploymentTaskStatusFunc: method is nil but PhaseItem.GetPostDeploymentTaskStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetPostDeploymentTaskStatus.Lock()
mock.calls.GetPostDeploymentTaskStatus = append(mock.calls.GetPostDeploymentTaskStatus, callInfo)
mock.lockGetPostDeploymentTaskStatus.Unlock()
return mock.GetPostDeploymentTaskStatusFunc()
}
// GetPostDeploymentTaskStatusCalls gets all the calls that were made to GetPostDeploymentTaskStatus.
// Check the length with:
//
// len(mockedPhaseItem.GetPostDeploymentTaskStatusCalls())
func (mock *PhaseItemMock) GetPostDeploymentTaskStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPostDeploymentTaskStatus.RLock()
calls = mock.calls.GetPostDeploymentTaskStatus
mock.lockGetPostDeploymentTaskStatus.RUnlock()
return calls
}
// GetPostDeploymentTasks calls GetPostDeploymentTasksFunc.
func (mock *PhaseItemMock) GetPostDeploymentTasks() []string {
if mock.GetPostDeploymentTasksFunc == nil {
panic("PhaseItemMock.GetPostDeploymentTasksFunc: method is nil but PhaseItem.GetPostDeploymentTasks was just called")
}
callInfo := struct {
}{}
mock.lockGetPostDeploymentTasks.Lock()
mock.calls.GetPostDeploymentTasks = append(mock.calls.GetPostDeploymentTasks, callInfo)
mock.lockGetPostDeploymentTasks.Unlock()
return mock.GetPostDeploymentTasksFunc()
}
// GetPostDeploymentTasksCalls gets all the calls that were made to GetPostDeploymentTasks.
// Check the length with:
//
// len(mockedPhaseItem.GetPostDeploymentTasksCalls())
func (mock *PhaseItemMock) GetPostDeploymentTasksCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPostDeploymentTasks.RLock()
calls = mock.calls.GetPostDeploymentTasks
mock.lockGetPostDeploymentTasks.RUnlock()
return calls
}
// GetPreDeploymentEvaluationTaskStatus calls GetPreDeploymentEvaluationTaskStatusFunc.
func (mock *PhaseItemMock) GetPreDeploymentEvaluationTaskStatus() []apilifecycle.ItemStatus {
if mock.GetPreDeploymentEvaluationTaskStatusFunc == nil {
panic("PhaseItemMock.GetPreDeploymentEvaluationTaskStatusFunc: method is nil but PhaseItem.GetPreDeploymentEvaluationTaskStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetPreDeploymentEvaluationTaskStatus.Lock()
mock.calls.GetPreDeploymentEvaluationTaskStatus = append(mock.calls.GetPreDeploymentEvaluationTaskStatus, callInfo)
mock.lockGetPreDeploymentEvaluationTaskStatus.Unlock()
return mock.GetPreDeploymentEvaluationTaskStatusFunc()
}
// GetPreDeploymentEvaluationTaskStatusCalls gets all the calls that were made to GetPreDeploymentEvaluationTaskStatus.
// Check the length with:
//
// len(mockedPhaseItem.GetPreDeploymentEvaluationTaskStatusCalls())
func (mock *PhaseItemMock) GetPreDeploymentEvaluationTaskStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPreDeploymentEvaluationTaskStatus.RLock()
calls = mock.calls.GetPreDeploymentEvaluationTaskStatus
mock.lockGetPreDeploymentEvaluationTaskStatus.RUnlock()
return calls
}
// GetPreDeploymentEvaluations calls GetPreDeploymentEvaluationsFunc.
func (mock *PhaseItemMock) GetPreDeploymentEvaluations() []string {
if mock.GetPreDeploymentEvaluationsFunc == nil {
panic("PhaseItemMock.GetPreDeploymentEvaluationsFunc: method is nil but PhaseItem.GetPreDeploymentEvaluations was just called")
}
callInfo := struct {
}{}
mock.lockGetPreDeploymentEvaluations.Lock()
mock.calls.GetPreDeploymentEvaluations = append(mock.calls.GetPreDeploymentEvaluations, callInfo)
mock.lockGetPreDeploymentEvaluations.Unlock()
return mock.GetPreDeploymentEvaluationsFunc()
}
// GetPreDeploymentEvaluationsCalls gets all the calls that were made to GetPreDeploymentEvaluations.
// Check the length with:
//
// len(mockedPhaseItem.GetPreDeploymentEvaluationsCalls())
func (mock *PhaseItemMock) GetPreDeploymentEvaluationsCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPreDeploymentEvaluations.RLock()
calls = mock.calls.GetPreDeploymentEvaluations
mock.lockGetPreDeploymentEvaluations.RUnlock()
return calls
}
// GetPreDeploymentTaskStatus calls GetPreDeploymentTaskStatusFunc.
func (mock *PhaseItemMock) GetPreDeploymentTaskStatus() []apilifecycle.ItemStatus {
if mock.GetPreDeploymentTaskStatusFunc == nil {
panic("PhaseItemMock.GetPreDeploymentTaskStatusFunc: method is nil but PhaseItem.GetPreDeploymentTaskStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetPreDeploymentTaskStatus.Lock()
mock.calls.GetPreDeploymentTaskStatus = append(mock.calls.GetPreDeploymentTaskStatus, callInfo)
mock.lockGetPreDeploymentTaskStatus.Unlock()
return mock.GetPreDeploymentTaskStatusFunc()
}
// GetPreDeploymentTaskStatusCalls gets all the calls that were made to GetPreDeploymentTaskStatus.
// Check the length with:
//
// len(mockedPhaseItem.GetPreDeploymentTaskStatusCalls())
func (mock *PhaseItemMock) GetPreDeploymentTaskStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPreDeploymentTaskStatus.RLock()
calls = mock.calls.GetPreDeploymentTaskStatus
mock.lockGetPreDeploymentTaskStatus.RUnlock()
return calls
}
// GetPreDeploymentTasks calls GetPreDeploymentTasksFunc.
func (mock *PhaseItemMock) GetPreDeploymentTasks() []string {
if mock.GetPreDeploymentTasksFunc == nil {
panic("PhaseItemMock.GetPreDeploymentTasksFunc: method is nil but PhaseItem.GetPreDeploymentTasks was just called")
}
callInfo := struct {
}{}
mock.lockGetPreDeploymentTasks.Lock()
mock.calls.GetPreDeploymentTasks = append(mock.calls.GetPreDeploymentTasks, callInfo)
mock.lockGetPreDeploymentTasks.Unlock()
return mock.GetPreDeploymentTasksFunc()
}
// GetPreDeploymentTasksCalls gets all the calls that were made to GetPreDeploymentTasks.
// Check the length with:
//
// len(mockedPhaseItem.GetPreDeploymentTasksCalls())
func (mock *PhaseItemMock) GetPreDeploymentTasksCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPreDeploymentTasks.RLock()
calls = mock.calls.GetPreDeploymentTasks
mock.lockGetPreDeploymentTasks.RUnlock()
return calls
}
// GetPreviousVersion calls GetPreviousVersionFunc.
func (mock *PhaseItemMock) GetPreviousVersion() string {
if mock.GetPreviousVersionFunc == nil {
panic("PhaseItemMock.GetPreviousVersionFunc: method is nil but PhaseItem.GetPreviousVersion was just called")
}
callInfo := struct {
}{}
mock.lockGetPreviousVersion.Lock()
mock.calls.GetPreviousVersion = append(mock.calls.GetPreviousVersion, callInfo)
mock.lockGetPreviousVersion.Unlock()
return mock.GetPreviousVersionFunc()
}
// GetPreviousVersionCalls gets all the calls that were made to GetPreviousVersion.
// Check the length with:
//
// len(mockedPhaseItem.GetPreviousVersionCalls())
func (mock *PhaseItemMock) GetPreviousVersionCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPreviousVersion.RLock()
calls = mock.calls.GetPreviousVersion
mock.lockGetPreviousVersion.RUnlock()
return calls
}
// GetPromotionTaskStatus calls GetPromotionTaskStatusFunc.
func (mock *PhaseItemMock) GetPromotionTaskStatus() []apilifecycle.ItemStatus {
if mock.GetPromotionTaskStatusFunc == nil {
panic("PhaseItemMock.GetPromotionTaskStatusFunc: method is nil but PhaseItem.GetPromotionTaskStatus was just called")
}
callInfo := struct {
}{}
mock.lockGetPromotionTaskStatus.Lock()
mock.calls.GetPromotionTaskStatus = append(mock.calls.GetPromotionTaskStatus, callInfo)
mock.lockGetPromotionTaskStatus.Unlock()
return mock.GetPromotionTaskStatusFunc()
}
// GetPromotionTaskStatusCalls gets all the calls that were made to GetPromotionTaskStatus.
// Check the length with:
//
// len(mockedPhaseItem.GetPromotionTaskStatusCalls())
func (mock *PhaseItemMock) GetPromotionTaskStatusCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPromotionTaskStatus.RLock()
calls = mock.calls.GetPromotionTaskStatus
mock.lockGetPromotionTaskStatus.RUnlock()
return calls
}
// GetPromotionTasks calls GetPromotionTasksFunc.
func (mock *PhaseItemMock) GetPromotionTasks() []string {
if mock.GetPromotionTasksFunc == nil {
panic("PhaseItemMock.GetPromotionTasksFunc: method is nil but PhaseItem.GetPromotionTasks was just called")
}
callInfo := struct {
}{}
mock.lockGetPromotionTasks.Lock()
mock.calls.GetPromotionTasks = append(mock.calls.GetPromotionTasks, callInfo)
mock.lockGetPromotionTasks.Unlock()
return mock.GetPromotionTasksFunc()
}
// GetPromotionTasksCalls gets all the calls that were made to GetPromotionTasks.
// Check the length with:
//
// len(mockedPhaseItem.GetPromotionTasksCalls())
func (mock *PhaseItemMock) GetPromotionTasksCalls() []struct {
} {
var calls []struct {
}
mock.lockGetPromotionTasks.RLock()
calls = mock.calls.GetPromotionTasks
mock.lockGetPromotionTasks.RUnlock()
return calls
}
// GetSpanAttributes calls GetSpanAttributesFunc.
func (mock *PhaseItemMock) GetSpanAttributes() []attribute.KeyValue {
if mock.GetSpanAttributesFunc == nil {
panic("PhaseItemMock.GetSpanAttributesFunc: method is nil but PhaseItem.GetSpanAttributes was just called")
}
callInfo := struct {
}{}
mock.lockGetSpanAttributes.Lock()
mock.calls.GetSpanAttributes = append(mock.calls.GetSpanAttributes, callInfo)
mock.lockGetSpanAttributes.Unlock()
return mock.GetSpanAttributesFunc()
}
// GetSpanAttributesCalls gets all the calls that were made to GetSpanAttributes.
// Check the length with:
//
// len(mockedPhaseItem.GetSpanAttributesCalls())
func (mock *PhaseItemMock) GetSpanAttributesCalls() []struct {
} {
var calls []struct {
}
mock.lockGetSpanAttributes.RLock()
calls = mock.calls.GetSpanAttributes
mock.lockGetSpanAttributes.RUnlock()
return calls
}
// GetStartTime calls GetStartTimeFunc.
func (mock *PhaseItemMock) GetStartTime() time.Time {
if mock.GetStartTimeFunc == nil {
panic("PhaseItemMock.GetStartTimeFunc: method is nil but PhaseItem.GetStartTime was just called")
}
callInfo := struct {
}{}
mock.lockGetStartTime.Lock()
mock.calls.GetStartTime = append(mock.calls.GetStartTime, callInfo)
mock.lockGetStartTime.Unlock()
return mock.GetStartTimeFunc()
}
// GetStartTimeCalls gets all the calls that were made to GetStartTime.
// Check the length with:
//
// len(mockedPhaseItem.GetStartTimeCalls())
func (mock *PhaseItemMock) GetStartTimeCalls() []struct {
} {
var calls []struct {
}
mock.lockGetStartTime.RLock()
calls = mock.calls.GetStartTime
mock.lockGetStartTime.RUnlock()
return calls
}
// GetState calls GetStateFunc.
func (mock *PhaseItemMock) GetState() apicommon.KeptnState {
if mock.GetStateFunc == nil {
panic("PhaseItemMock.GetStateFunc: method is nil but PhaseItem.GetState was just called")
}
callInfo := struct {
}{}
mock.lockGetState.Lock()
mock.calls.GetState = append(mock.calls.GetState, callInfo)
mock.lockGetState.Unlock()
return mock.GetStateFunc()
}
// GetStateCalls gets all the calls that were made to GetState.
// Check the length with:
//
// len(mockedPhaseItem.GetStateCalls())
func (mock *PhaseItemMock) GetStateCalls() []struct {
} {
var calls []struct {
}
mock.lockGetState.RLock()
calls = mock.calls.GetState
mock.lockGetState.RUnlock()
return calls
}
// GetVersion calls GetVersionFunc.
func (mock *PhaseItemMock) GetVersion() string {
if mock.GetVersionFunc == nil {
panic("PhaseItemMock.GetVersionFunc: method is nil but PhaseItem.GetVersion was just called")
}
callInfo := struct {
}{}
mock.lockGetVersion.Lock()
mock.calls.GetVersion = append(mock.calls.GetVersion, callInfo)
mock.lockGetVersion.Unlock()
return mock.GetVersionFunc()
}
// GetVersionCalls gets all the calls that were made to GetVersion.
// Check the length with:
//
// len(mockedPhaseItem.GetVersionCalls())
func (mock *PhaseItemMock) GetVersionCalls() []struct {
} {
var calls []struct {
}
mock.lockGetVersion.RLock()
calls = mock.calls.GetVersion
mock.lockGetVersion.RUnlock()
return calls
}
// IsEndTimeSet calls IsEndTimeSetFunc.