|
38 | 38 | V1DriveStatus, |
39 | 39 | V1DriveType, |
40 | 40 | V1EnvVar, |
41 | | - V1GetClusterResponse, |
42 | 41 | V1GetUserResponse, |
43 | 42 | V1LightningappInstanceSpec, |
44 | 43 | V1LightningappInstanceState, |
@@ -208,7 +207,7 @@ def test_new_instance_on_different_cluster(self, tmpdir, cloud_backend, project_ |
208 | 207 | ) |
209 | 208 |
|
210 | 209 | # Mock all clusters as global clusters |
211 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 210 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
212 | 211 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
213 | 212 | ) |
214 | 213 |
|
@@ -277,7 +276,7 @@ def test_running_deleted_app(self, tmpdir, cloud_backend, project_id): |
277 | 276 | ) |
278 | 277 |
|
279 | 278 | # Mock all clusters as global clusters |
280 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 279 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
281 | 280 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
282 | 281 | ) |
283 | 282 |
|
@@ -588,7 +587,7 @@ def test_call_with_work_app(self, lightningapps, start_with_flow, monkeypatch, t |
588 | 587 | mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse( |
589 | 588 | clusters=[V1ProjectClusterBinding(cluster_id="test")] |
590 | 589 | ) |
591 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 590 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
592 | 591 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
593 | 592 | ) |
594 | 593 | mock_client.cloud_space_service_create_lightning_run_instance.return_value = V1LightningRun() |
@@ -765,7 +764,7 @@ def test_call_with_work_app_and_attached_drives(self, lightningapps, monkeypatch |
765 | 764 | mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse( |
766 | 765 | clusters=[V1ProjectClusterBinding(cluster_id="test")] |
767 | 766 | ) |
768 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 767 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
769 | 768 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
770 | 769 | ) |
771 | 770 | mock_client.cloud_space_service_create_lightning_run_instance.return_value = V1LightningRun() |
@@ -901,7 +900,7 @@ def test_call_with_work_app_and_app_comment_command_execution_set(self, lightnin |
901 | 900 | mock_client.projects_service_list_project_cluster_bindings.return_value = ( |
902 | 901 | V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")]) |
903 | 902 | ) |
904 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 903 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
905 | 904 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
906 | 905 | ) |
907 | 906 | mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse( |
@@ -1031,7 +1030,7 @@ def test_call_with_work_app_and_multiple_attached_drives(self, lightningapps, mo |
1031 | 1030 | ] |
1032 | 1031 | ) |
1033 | 1032 | ) |
1034 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 1033 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
1035 | 1034 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
1036 | 1035 | ) |
1037 | 1036 | mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse( |
@@ -1247,7 +1246,7 @@ def test_call_with_work_app_and_attached_mount_and_drive(self, lightningapps, mo |
1247 | 1246 | mock_client.projects_service_list_project_cluster_bindings.return_value = ( |
1248 | 1247 | V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")]) |
1249 | 1248 | ) |
1250 | | - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( |
| 1249 | + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( |
1251 | 1250 | id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) |
1252 | 1251 | ) |
1253 | 1252 | mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse( |
|
0 commit comments