Skip to content

Commit 23bffcc

Browse files
sutaakaropenshift-merge-bot[bot]
authored andcommitted
Add completion status for TestMNISTPyTorchMCAD
1 parent 39e9422 commit 23bffcc

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.19
55
require (
66
github.com/onsi/gomega v1.27.10
77
github.com/openshift/api v0.0.0-20230213134911-7ba313770556
8-
github.com/project-codeflare/codeflare-common v0.0.0-20231110155354-042fb171fcdb
8+
github.com/project-codeflare/codeflare-common v0.0.0-20231129165224-988ba1da9069
99
github.com/project-codeflare/instascale v0.3.1
1010
github.com/project-codeflare/multi-cluster-app-dispatcher v1.38.1
1111
github.com/ray-project/kuberay/ray-operator v1.0.0-rc.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
391391
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
392392
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
393393
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
394-
github.com/project-codeflare/codeflare-common v0.0.0-20231110155354-042fb171fcdb h1:L2Gdr2SlvshDKZY2KK6507AwzQ1NSfRbMQuz5dOsYNM=
395-
github.com/project-codeflare/codeflare-common v0.0.0-20231110155354-042fb171fcdb/go.mod h1:zdi2GCYJX+QyxFWyCLMoTme3NMz/aucWDJWMqKfigxk=
394+
github.com/project-codeflare/codeflare-common v0.0.0-20231129165224-988ba1da9069 h1:81+ma1mchF/LtAGsf+poAt50kJ/fLYjoTAcZOxci1Yc=
395+
github.com/project-codeflare/codeflare-common v0.0.0-20231129165224-988ba1da9069/go.mod h1:zdi2GCYJX+QyxFWyCLMoTme3NMz/aucWDJWMqKfigxk=
396396
github.com/project-codeflare/instascale v0.3.1 h1:LIKo5NaX7kDPmAYy1aAkF0yykql3ZdCiiLsBOC4HRcM=
397397
github.com/project-codeflare/instascale v0.3.1/go.mod h1:Fdy3daVhz3BHFvPyr9zfH6uFF2yww73U41Wq2S2zDI8=
398398
github.com/project-codeflare/multi-cluster-app-dispatcher v1.38.1 h1:6ILHYAFxDkAnQu3CJebGQPQGcmcy7/E/AhRiea6yOTc=

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)