@@ -242,10 +242,6 @@ def test_raycluster_details_cli(mocker):
242
242
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object" ,
243
243
side_effect = get_ray_obj ,
244
244
)
245
- mocker .patch (
246
- "codeflare_sdk.cluster.cluster.get_current_namespace" ,
247
- return_value = "ns" ,
248
- )
249
245
mocker .patch (
250
246
"codeflare_sdk.cluster.cluster.Cluster.status" ,
251
247
return_value = (False , CodeFlareClusterStatus .UNKNOWN ),
@@ -282,18 +278,6 @@ def test_raycluster_details_cli(mocker):
282
278
283
279
def test_raycluster_status_cli (mocker ):
284
280
runner = CliRunner ()
285
- test_raycluster = RayCluster (
286
- "quicktest" ,
287
- RayClusterStatus .READY ,
288
- 1 ,
289
- 1 ,
290
- "1" ,
291
- "1" ,
292
- 1 ,
293
- 1 ,
294
- "default" ,
295
- "dashboard-url" ,
296
- )
297
281
mocker .patch (
298
282
"kubernetes.client.CustomObjectsApi.list_namespaced_custom_object" ,
299
283
side_effect = get_ray_obj ,
@@ -306,6 +290,19 @@ def test_raycluster_status_cli(mocker):
306
290
"codeflare_sdk.cluster.cluster.Cluster.cluster_dashboard_uri" ,
307
291
return_value = "" ,
308
292
)
293
+ mocker .patch .object (client , "ApiClient" )
294
+ test_raycluster = RayCluster (
295
+ "quicktest" ,
296
+ RayClusterStatus .READY ,
297
+ 1 ,
298
+ 1 ,
299
+ "1" ,
300
+ "1" ,
301
+ 1 ,
302
+ 1 ,
303
+ "default" ,
304
+ "dashboard-url" ,
305
+ )
309
306
mocker .patch (
310
307
"codeflare_sdk.cluster.cluster._app_wrapper_status" ,
311
308
return_value = test_raycluster ,
@@ -314,7 +311,6 @@ def test_raycluster_status_cli(mocker):
314
311
"codeflare_sdk.cluster.cluster._ray_cluster_status" ,
315
312
return_value = test_raycluster ,
316
313
)
317
- mocker .patch .object (client , "ApiClient" )
318
314
raycluster_status_command = """
319
315
status raycluster quicktest
320
316
"""
0 commit comments