Skip to content

Commit b4b8a04

Browse files
committed
Add completion status for TestMNISTPyTorchMCAD
1 parent 39e9422 commit b4b8a04

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/e2e/mnist_pytorch_mcad_job_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)