Skip to content

Commit d2f8ec9

Browse files
committed
connect to rpc
1 parent 50f2de1 commit d2f8ec9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

services/catalog/src/simcore_service_catalog/api/rpc/_services.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
CatalogForbiddenError,
2222
CatalogItemNotFoundError,
2323
)
24+
from simcore_service_catalog.db.repositories.groups import GroupsRepository
2425

2526
from ...db.repositories.services import ServicesRepository
2627
from ...services import services_api
@@ -182,5 +183,17 @@ async def batch_get_my_services(
182183
]
183184
],
184185
) -> list[MyServiceGet]:
186+
assert app.state.engine # nosec
187+
188+
# TODO: id not found?
189+
services = await services_api.batch_get_my_services(
190+
repo=ServicesRepository(app.state.engine),
191+
groups_repo=GroupsRepository(app.state.engine),
192+
product_name=product_name,
193+
user_id=user_id,
194+
ids=ids,
195+
)
196+
197+
assert [(sv.key, sv.release.version) for sv in services] == ids # nosec
185198

186-
raise NotImplementedError
199+
return services

services/catalog/tests/unit/with_dbs/test_services_services_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,7 @@ async def test_batch_get_my_services(
256256
},
257257
]
258258
)
259+
260+
# TODO: test user has no access to one and needs to ask owner (NOTE: owner can be a group? )
261+
# TODO: test user has no access to entire history
262+
#

0 commit comments

Comments
 (0)