@@ -143,7 +143,8 @@ func TestMNISTPyTorchMCAD(t *testing.T) {
143143 },
144144 },
145145 },
146- GenericTemplate : Raw (test , job ),
146+ GenericTemplate : Raw (test , job ),
147+ CompletionStatus : "Complete" ,
147148 },
148149 },
149150 },
@@ -159,13 +160,13 @@ func TestMNISTPyTorchMCAD(t *testing.T) {
159160 Should (WithTransform (AppWrapperState , Equal (mcadv1beta1 .AppWrapperStateActive )))
160161
161162 test .T ().Logf ("Waiting for Job %s/%s to complete" , job .Namespace , job .Name )
162- test .Eventually (Job (test , job . Namespace , job .Name ), TestTimeoutLong ).Should (
163+ test .Eventually (AppWrapper (test , namespace , aw .Name ), TestTimeoutLong ).Should (
163164 Or (
164- WithTransform (ConditionStatus ( batchv1 . JobComplete ) , Equal (corev1 . ConditionTrue )),
165- WithTransform (ConditionStatus ( batchv1 . JobFailed ) , Equal (corev1 . ConditionTrue )),
165+ WithTransform (AppWrapperState , Equal (mcadv1beta1 . AppWrapperStateCompleted )),
166+ WithTransform (AppWrapperState , Equal (mcadv1beta1 . AppWrapperStateFailed )),
166167 ))
167168
168169 // Assert the job has completed successfully
169- test .Expect (GetJob (test , job . Namespace , job .Name )).
170- To (WithTransform (ConditionStatus ( batchv1 . JobComplete ) , Equal (corev1 . ConditionTrue )))
170+ test .Expect (GetAppWrapper (test , namespace , aw .Name )).
171+ To (WithTransform (AppWrapperState , Equal (mcadv1beta1 . AppWrapperStateCompleted )))
171172}
0 commit comments