Skip to content

Commit 2a66cf4

Browse files
committed
ongoing
1 parent 2e93a7e commit 2a66cf4

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

packages/pytest-simcore/src/pytest_simcore/simcore_storage_datcore_adapter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55
import respx
66
from faker import Faker
7+
from fastapi_pagination import LimitOffsetParams, create_page
78
from servicelib.aiohttp import status
89
from simcore_service_storage.modules.datcore_adapter.datcore_adapter_settings import (
910
DatcoreAdapterSettings,
@@ -29,7 +30,8 @@ def datcore_adapter_service_mock(faker: Faker) -> Iterator[respx.MockRouter]:
2930
).respond(status.HTTP_200_OK, json=faker.pydict(allowed_types=(str,)))
3031
list_datasets_re = re.compile(rf"^{datcore_adapter_base_url}/datasets")
3132
respx_mocker.get(list_datasets_re, name="list_datasets").respond(
32-
status.HTTP_200_OK
33+
status.HTTP_200_OK,
34+
json=create_page([], 0, LimitOffsetParams()),
3335
)
3436
respx_mocker.get(datcore_adapter_base_url, name="base_endpoint").respond(
3537
status.HTTP_200_OK, json={}

services/storage/tests/unit/test_handlers_paths.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from pytest_simcore.helpers.httpx_assert_checks import assert_status
3030
from pytest_simcore.helpers.storage_utils import FileIDDict, ProjectWithFilesParams
3131
from simcore_postgres_database.models.projects import projects
32+
from simcore_service_storage.simcore_s3_dsm import SimcoreS3DataManager
3233
from sqlalchemy.ext.asyncio import AsyncEngine
3334

3435
pytest_simcore_core_services_selection = ["postgres"]
@@ -118,6 +119,7 @@ async def test_list_paths_root_folder_of_empty_returns_nothing(
118119
client: httpx.AsyncClient,
119120
location_id: LocationID,
120121
user_id: UserID,
122+
fake_datcore_tokens: tuple[str, str],
121123
):
122124
await _assert_list_paths(
123125
initialized_app,
@@ -129,6 +131,12 @@ async def test_list_paths_root_folder_of_empty_returns_nothing(
129131
)
130132

131133

134+
@pytest.mark.parametrize(
135+
"location_id",
136+
[SimcoreS3DataManager.get_location_id()],
137+
ids=[SimcoreS3DataManager.get_location_name()],
138+
indirect=True,
139+
)
132140
@pytest.mark.parametrize(
133141
"project_params",
134142
[
@@ -206,6 +214,12 @@ async def test_list_paths_pagination(
206214
)
207215

208216

217+
@pytest.mark.parametrize(
218+
"location_id",
219+
[SimcoreS3DataManager.get_location_id()],
220+
ids=[SimcoreS3DataManager.get_location_name()],
221+
indirect=True,
222+
)
209223
@pytest.mark.parametrize(
210224
"project_params, num_projects",
211225
[
@@ -368,6 +382,12 @@ async def test_list_paths(
368382
)
369383

370384

385+
@pytest.mark.parametrize(
386+
"location_id",
387+
[SimcoreS3DataManager.get_location_id()],
388+
ids=[SimcoreS3DataManager.get_location_name()],
389+
indirect=True,
390+
)
371391
@pytest.mark.parametrize(
372392
"project_params",
373393
[
@@ -529,6 +549,12 @@ async def _assert_compute_path_total_size(
529549
return received.size
530550

531551

552+
@pytest.mark.parametrize(
553+
"location_id",
554+
[SimcoreS3DataManager.get_location_id()],
555+
ids=[SimcoreS3DataManager.get_location_name()],
556+
indirect=True,
557+
)
532558
@pytest.mark.parametrize(
533559
"project_params",
534560
[

0 commit comments

Comments
 (0)