diff --git a/pkg/common/util/v1/testutil/tfjob.go b/pkg/common/util/v1/testutil/tfjob.go index 89d0430c12..b3c8b666e3 100644 --- a/pkg/common/util/v1/testutil/tfjob.go +++ b/pkg/common/util/v1/testutil/tfjob.go @@ -145,7 +145,7 @@ func NewTFJob(worker, ps int) *tfv1.TFJob { return tfJob } -func NewTFJobV2(worker, ps, master, cheif, evaluator int) *tfv1.TFJob { +func NewTFJobV2(worker, ps, master, chief, evaluator int) *tfv1.TFJob { tfJob := &tfv1.TFJob{ TypeMeta: metav1.TypeMeta{ Kind: TFJobKind, @@ -187,13 +187,13 @@ func NewTFJobV2(worker, ps, master, cheif, evaluator int) *tfv1.TFJob { tfJob.Spec.TFReplicaSpecs[tfv1.TFReplicaTypeMaster] = masterReplicaSpec } - if cheif > 0 { - cheif := int32(cheif) - cheifReplicaSpec := &commonv1.ReplicaSpec{ - Replicas: &cheif, + if chief > 0 { + chief := int32(chief) + chiefReplicaSpec := &commonv1.ReplicaSpec{ + Replicas: &chief, Template: NewTFReplicaSpecTemplate(), } - tfJob.Spec.TFReplicaSpecs[tfv1.TFReplicaTypeChief] = cheifReplicaSpec + tfJob.Spec.TFReplicaSpecs[tfv1.TFReplicaTypeChief] = chiefReplicaSpec } if evaluator > 0 {