@@ -663,6 +663,30 @@ var _ = Describe("Test for controller.v1/common", func() {
663
663
wantTFJobIsRemoved : false ,
664
664
wantErr : false ,
665
665
}),
666
+ Entry ("No error with completionTime is nil if suspended" , & cleanUpCases {
667
+ tfJob : tftestutil .NewTFJobWithCleanupJobDelay (1 , 2 , 0 , nil ),
668
+ runPolicy : & kubeflowv1.RunPolicy {
669
+ TTLSecondsAfterFinished : nil ,
670
+ Suspend : ptr .To (true ),
671
+ },
672
+ jobStatus : kubeflowv1.JobStatus {
673
+ CompletionTime : nil ,
674
+ },
675
+ wantTFJobIsRemoved : false ,
676
+ wantErr : false ,
677
+ }),
678
+ Entry ("No error with TTL is set and completionTime is nil, if suspended" , & cleanUpCases {
679
+ tfJob : tftestutil .NewTFJobWithCleanupJobDelay (1 , 2 , 0 , ptr.To [int32 ](10 )),
680
+ runPolicy : & kubeflowv1.RunPolicy {
681
+ TTLSecondsAfterFinished : ptr.To [int32 ](10 ),
682
+ Suspend : ptr .To (true ),
683
+ },
684
+ jobStatus : kubeflowv1.JobStatus {
685
+ CompletionTime : nil ,
686
+ },
687
+ wantTFJobIsRemoved : false ,
688
+ wantErr : false ,
689
+ }),
666
690
Entry ("Error is occurred since completionTime is nil" , & cleanUpCases {
667
691
tfJob : tftestutil .NewTFJobWithCleanupJobDelay (1 , 2 , 0 , ptr.To [int32 ](10 )),
668
692
runPolicy : & kubeflowv1.RunPolicy {
0 commit comments