|
31 | 31 | from simcore_service_storage.api.rpc._async_jobs import AsyncJobNameData |
32 | 32 | from simcore_service_storage.api.rpc._data_export import AccessRightError |
33 | 33 | from simcore_service_storage.core.settings import ApplicationSettings |
| 34 | +from simcore_service_storage.simcore_s3_dsm import SimcoreS3DataManager |
34 | 35 |
|
35 | 36 | pytest_plugins = [ |
36 | 37 | "pytest_simcore.rabbit_service", |
@@ -86,6 +87,12 @@ class UserWithFile(NamedTuple): |
86 | 87 | file: Path |
87 | 88 |
|
88 | 89 |
|
| 90 | +@pytest.mark.parametrize( |
| 91 | + "location_id", |
| 92 | + [SimcoreS3DataManager.get_location_id()], |
| 93 | + ids=[SimcoreS3DataManager.get_location_name()], |
| 94 | + indirect=True, |
| 95 | +) |
89 | 96 | @pytest.mark.parametrize( |
90 | 97 | "project_params,_type", |
91 | 98 | [ |
@@ -117,10 +124,9 @@ async def test_start_data_export_success( |
117 | 124 | user_id: UserID, |
118 | 125 | _type: Literal["file", "folder"], |
119 | 126 | ): |
120 | | - |
121 | 127 | _, list_of_files = with_random_project_with_files |
122 | 128 | workspace_files = [ |
123 | | - p for p in list(list_of_files.values())[0].keys() if "/workspace/" in p |
| 129 | + p for p in next(iter(list_of_files.values())) if "/workspace/" in p |
124 | 130 | ] |
125 | 131 | assert len(workspace_files) > 0 |
126 | 132 | file_or_folder_id: SimcoreS3FileID |
@@ -152,7 +158,6 @@ async def test_start_data_export_success( |
152 | 158 | async def test_start_data_export_fail( |
153 | 159 | rpc_client: RabbitMQRPCClient, user_id: UserID, faker: Faker |
154 | 160 | ): |
155 | | - |
156 | 161 | with pytest.raises(AccessRightError): |
157 | 162 | _ = await async_jobs.submit_job( |
158 | 163 | rpc_client, |
|
0 commit comments