@@ -57,7 +57,7 @@ def run_mnist_raycluster_sdk_oauth(self):
5757 cluster .up ()
5858 cluster .status ()
5959 # wait for raycluster to be Ready
60- # cluster.wait_ready() # temporarily broken
60+ # cluster.wait_ready() #temporarily broken
6161 sleep (60 )
6262 cluster .status ()
6363 # Check cluster details
@@ -98,27 +98,16 @@ def test_mnist_job_submission(self):
9898 # Assertions
9999 def assert_jobsubmit_withoutLogin (self , cluster ):
100100 dashboard_url = cluster .cluster_dashboard_uri ()
101- jobdata = {
102- "entrypoint" : "python mnist.py" ,
103- "runtime_env" : {
104- "working_dir" : "./tests/e2e/" ,
105- "pip" : "./tests/e2e/mnist_pip_requirements.txt" ,
106- },
107- }
108101 try :
109- response = requests . post (
110- dashboard_url + "/api/jobs/" , verify = False , json = jobdata
111- )
112- if response .status_code == 403 :
102+ RayJobClient ( address = dashboard_url , verify = False )
103+ assert False
104+ except Exception as e :
105+ if e . response .status_code == 403 :
113106 assert True
114107 else :
115- response . raise_for_status ( )
108+ print ( f"An unexpected error occurred. Error: { e } " )
116109 assert False
117110
118- except Exception as e :
119- print (f"An unexpected error occurred. Error: { e } " )
120- assert False
121-
122111 def assert_jobsubmit_withlogin (self , cluster ):
123112 auth_token = run_oc_command (["whoami" , "--show-token=true" ])
124113 ray_dashboard = cluster .cluster_dashboard_uri ()
0 commit comments