@@ -97,7 +97,7 @@ func TestGetSubmitterTemplate(t *testing.T) {
9797 // RayJob instance with user-provided submitter pod template.
9898 rayJobInstanceWithTemplate := & rayv1.RayJob {
9999 Spec : rayv1.RayJobSpec {
100- Entrypoint : "echo hello world " ,
100+ Entrypoint : "echo no quote 'single quote' \" double quote \" " ,
101101 SubmitterPodTemplate : & corev1.PodTemplateSpec {
102102 Spec : corev1.PodSpec {
103103 Containers : []corev1.Container {
@@ -118,7 +118,7 @@ func TestGetSubmitterTemplate(t *testing.T) {
118118 // In this case we should use the image of the Ray Head, so specify the image so we can test it.
119119 rayJobInstanceWithoutTemplate := & rayv1.RayJob {
120120 Spec : rayv1.RayJobSpec {
121- Entrypoint : "echo hello world " ,
121+ Entrypoint : "echo no quote 'single quote' \" double quote \" " ,
122122 RayClusterSpec : & rayv1.RayClusterSpec {
123123 HeadGroupSpec : rayv1.HeadGroupSpec {
124124 Template : corev1.PodTemplateSpec {
@@ -165,14 +165,14 @@ func TestGetSubmitterTemplate(t *testing.T) {
165165 rayJobInstanceWithTemplate .Spec .SubmitterPodTemplate .Spec .Containers [utils .RayContainerIndex ].Command = []string {}
166166 submitterTemplate , err = getSubmitterTemplate (ctx , rayJobInstanceWithTemplate , nil )
167167 require .NoError (t , err )
168- assert .Equal (t , []string {"/bin/sh " }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Command )
169- assert .Equal (t , []string {"-c" , "if ray job status --address http://test-url test-job-id >/dev/null 2>&1 ; then ray job logs --address http://test-url --follow test-job-id ; else ray job submit --address http://test-url --submission-id test-job-id -- echo hello world ; fi" }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Args )
168+ assert .Equal (t , []string {"/bin/bash " }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Command )
169+ assert .Equal (t , []string {"-c" , "if ray job status --address http://test-url test-job-id >/dev/null 2>&1 ; then ray job logs --address http://test-url --follow test-job-id ; else ray job submit --address http://test-url --submission-id test-job-id -- echo no quote 'single quote' \" double quote \" ; fi" }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Args )
170170
171171 // Test 3: User did not provide template, should use the image of the Ray Head
172172 submitterTemplate , err = getSubmitterTemplate (ctx , rayJobInstanceWithoutTemplate , rayClusterInstance )
173173 require .NoError (t , err )
174- assert .Equal (t , []string {"/bin/sh " }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Command )
175- assert .Equal (t , []string {"-c" , "if ray job status --address http://test-url test-job-id >/dev/null 2>&1 ; then ray job logs --address http://test-url --follow test-job-id ; else ray job submit --address http://test-url --submission-id test-job-id -- echo hello world ; fi" }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Args )
174+ assert .Equal (t , []string {"/bin/bash " }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Command )
175+ assert .Equal (t , []string {"-c" , "if ray job status --address http://test-url test-job-id >/dev/null 2>&1 ; then ray job logs --address http://test-url --follow test-job-id ; else ray job submit --address http://test-url --submission-id test-job-id -- echo no quote 'single quote' \" double quote \" ; fi" }, submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Args )
176176 assert .Equal (t , "rayproject/ray:custom-version" , submitterTemplate .Spec .Containers [utils .RayContainerIndex ].Image )
177177
178178 // Test 4: Check default PYTHONUNBUFFERED setting
0 commit comments