Skip to content

Commit 083f308

Browse files
committed
One more test
1 parent c0a34b9 commit 083f308

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

pkg/controller/podgroup_test.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,39 @@ func TestCalculatePGMinResources(t *testing.T) {
519519
corev1.ResourceMemory: resource.MustParse("65Gi"),
520520
},
521521
},
522+
"without worker without priorityClass": {
523+
minMember: 3,
524+
job: &kubeflow.MPIJob{
525+
ObjectMeta: metav1.ObjectMeta{
526+
Name: "test",
527+
},
528+
Spec: kubeflow.MPIJobSpec{
529+
MPIReplicaSpecs: map[kubeflow.MPIReplicaType]*kubeflow.ReplicaSpec{
530+
kubeflow.MPIReplicaTypeLauncher: {
531+
Replicas: ptr.To[int32](1),
532+
Template: corev1.PodTemplateSpec{
533+
Spec: corev1.PodSpec{
534+
Containers: []corev1.Container{
535+
{
536+
Resources: corev1.ResourceRequirements{
537+
Requests: corev1.ResourceList{
538+
corev1.ResourceCPU: resource.MustParse("2"),
539+
corev1.ResourceMemory: resource.MustParse("1Gi"),
540+
},
541+
},
542+
},
543+
},
544+
},
545+
},
546+
},
547+
},
548+
},
549+
},
550+
want: &corev1.ResourceList{
551+
corev1.ResourceCPU: resource.MustParse("2"),
552+
corev1.ResourceMemory: resource.MustParse("1Gi"),
553+
},
554+
},
522555
}
523556
for name, tc := range volcanoTests {
524557
t.Run(name, func(t *testing.T) {

0 commit comments

Comments
 (0)