@@ -333,7 +333,11 @@ func TestBuildPod(t *testing.T) {
333
333
// Test head pod
334
334
podName := strings .ToLower (cluster .Name + utils .DashSymbol + string (rayv1 .HeadNode ) + utils .DashSymbol + utils .FormatInt32 (0 ))
335
335
podTemplateSpec := DefaultHeadPodTemplate (* cluster , cluster .Spec .HeadGroupSpec , podName , "6379" )
336
- pod := BuildPod (podTemplateSpec , rayv1 .HeadNode , cluster .Spec .HeadGroupSpec .RayStartParams , "6379" , nil , "" , "" , false )
336
+ pod := BuildPod (podTemplateSpec , rayv1 .HeadNode , cluster .Spec .HeadGroupSpec .RayStartParams , "6379" , nil , "" , "" , true )
337
+
338
+ val , ok := pod .Labels [utils .RayClusterServingServiceLabelKey ]
339
+ assert .True (t , ok , "Expected serve label is not present" )
340
+ assert .Equal (t , utils .EnableRayClusterServingServiceFalse , val , "Wrong serve label value" )
337
341
338
342
// Check environment variables
339
343
rayContainer := pod .Spec .Containers [utils .RayContainerIndex ]
@@ -386,7 +390,11 @@ func TestBuildPod(t *testing.T) {
386
390
podName = cluster .Name + utils .DashSymbol + string (rayv1 .WorkerNode ) + utils .DashSymbol + worker .GroupName + utils .DashSymbol + utils .FormatInt32 (0 )
387
391
fqdnRayIP := utils .GenerateFQDNServiceName (* cluster , cluster .Namespace )
388
392
podTemplateSpec = DefaultWorkerPodTemplate (* cluster , worker , podName , fqdnRayIP , "6379" )
389
- pod = BuildPod (podTemplateSpec , rayv1 .WorkerNode , worker .RayStartParams , "6379" , nil , "" , fqdnRayIP , false )
393
+ pod = BuildPod (podTemplateSpec , rayv1 .WorkerNode , worker .RayStartParams , "6379" , nil , "" , fqdnRayIP , true )
394
+
395
+ val , ok = pod .Labels [utils .RayClusterServingServiceLabelKey ]
396
+ assert .True (t , ok , "Expected serve label is not present" )
397
+ assert .Equal (t , utils .EnableRayClusterServingServiceTrue , val , "Wrong serve label value" )
390
398
391
399
// Check environment variables
392
400
rayContainer = pod .Spec .Containers [utils .RayContainerIndex ]
@@ -407,12 +415,6 @@ func TestBuildPod(t *testing.T) {
407
415
// Check Envs
408
416
rayContainer = pod .Spec .Containers [utils .RayContainerIndex ]
409
417
checkContainerEnv (t , rayContainer , "TEST_ENV_NAME" , "TEST_ENV_VALUE" )
410
-
411
- // Try to build pod for serve
412
- pod = BuildPod (podTemplateSpec , rayv1 .HeadNode , cluster .Spec .HeadGroupSpec .RayStartParams , "6379" , nil , "" , "" , true )
413
- val , ok := pod .Labels [utils .RayClusterServingServiceLabelKey ]
414
- assert .True (t , ok , "Expected serve label is not present" )
415
- assert .Equal (t , utils .EnableRayClusterServingServiceTrue , val , "Wrong serve label value" )
416
418
}
417
419
418
420
func TestBuildPod_WithOverwriteCommand (t * testing.T ) {
0 commit comments