Skip to content

Commit 86318f5

Browse files
fix url
1 parent 0a39fd0 commit 86318f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_thin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ def _get_url(
6363
no_api_version: bool = False,
6464
) -> str:
6565
"""formats and returns an url for the request"""
66-
api_version = "" if no_api_version else f"/{self.API_VERSION}"
66+
api_version = "" if no_api_version else f"{self.API_VERSION}/"
6767
return f"{dynamic_sidecar_endpoint}{api_version}{postfix}"
6868

6969
async def _get_health_common(
7070
self, dynamic_sidecar_endpoint: AnyHttpUrl
7171
) -> Response:
72-
url = self._get_url(dynamic_sidecar_endpoint, "/health", no_api_version=True)
72+
url = self._get_url(dynamic_sidecar_endpoint, "health", no_api_version=True)
7373
return await self.client.get(url, timeout=self._health_request_timeout)
7474

7575
@retry_on_errors()
@@ -88,7 +88,7 @@ async def get_health_no_retry(
8888
async def get_containers(
8989
self, dynamic_sidecar_endpoint: AnyHttpUrl, *, only_status: bool
9090
) -> Response:
91-
url = self._get_url(dynamic_sidecar_endpoint, "/containers")
91+
url = self._get_url(dynamic_sidecar_endpoint, "containers")
9292
return await self.client.get(url, params={"only_status": only_status})
9393

9494
@retry_on_errors()

services/director-v2/tests/unit/test_modules_dynamic_sidecar_client_api_thin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def test_get_containers(
116116
mock_response = Response(status.HTTP_200_OK)
117117
mock_request(
118118
"GET",
119-
f"{dynamic_sidecar_endpoint}/{thin_client.API_VERSION}/containers?only_status={str(only_status).lower()}",
119+
f"{dynamic_sidecar_endpoint}{thin_client.API_VERSION}/containers?only_status={str(only_status).lower()}",
120120
mock_response,
121121
None,
122122
)

0 commit comments

Comments
 (0)