Skip to content

Commit 52aa6e6

Browse files
Adjust VAP tests to work along Training-Operator
1 parent 20aa8c1 commit 52aa6e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/odh/validating_admission_policy_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,12 @@ func createAppWrapper(test Test, namespaceName string, localQueue bool) error {
370370
func createPyTorchJob(test Test, namespaceName string, localQueue bool) error {
371371
if localQueue {
372372
pyt = testingpytorchjob.MakePyTorchJob(uniqueSuffix(pytWithLQName), namespaceName).Queue(lq.Name).Obj()
373+
pyt.Spec.PyTorchReplicaSpecs[kftrainingv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Name = "pytorch"
374+
pyt.Spec.PyTorchReplicaSpecs[kftrainingv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Name = "pytorch"
373375
} else {
374376
pyt = testingpytorchjob.MakePyTorchJob(uniqueSuffix(pytNoLQName), namespaceName).Obj()
377+
pyt.Spec.PyTorchReplicaSpecs[kftrainingv1.PyTorchJobReplicaTypeMaster].Template.Spec.Containers[0].Name = "pytorch"
378+
pyt.Spec.PyTorchReplicaSpecs[kftrainingv1.PyTorchJobReplicaTypeWorker].Template.Spec.Containers[0].Name = "pytorch"
375379
}
376380
_, err := test.Client().Kubeflow().KubeflowV1().PyTorchJobs(namespaceName).Create(test.Ctx(), pyt, metav1.CreateOptions{})
377381
return err

0 commit comments

Comments
 (0)