From 1e9ff2d552a48e0af829b441a220e95997eec909 Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Thu, 14 Nov 2024 12:29:56 +0100 Subject: [PATCH] fix url --- packages/aws-library/src/aws_library/s3/_client.py | 2 +- packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py | 4 ++-- .../tests/integration/test_node_ports_common_aws_s3_cli.py | 4 +++- .../tests/integration/test_node_ports_common_r_clone.py | 4 +++- .../tests/integration/test_modules_long_running_tasks.py | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/aws-library/src/aws_library/s3/_client.py b/packages/aws-library/src/aws_library/s3/_client.py index 38e7c0f9636..5f89a2cee7c 100644 --- a/packages/aws-library/src/aws_library/s3/_client.py +++ b/packages/aws-library/src/aws_library/s3/_client.py @@ -73,7 +73,7 @@ async def create( session = aioboto3.Session() session_client = session.client( "s3", - endpoint_url=settings.S3_ENDPOINT, + endpoint_url=f"{settings.S3_ENDPOINT}", aws_access_key_id=settings.S3_ACCESS_KEY, aws_secret_access_key=settings.S3_SECRET_KEY, region_name=settings.S3_REGION, diff --git a/packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py b/packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py index e6afeac8e7b..012deb09622 100644 --- a/packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py +++ b/packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py @@ -25,14 +25,14 @@ async def s3_client(s3_settings: S3Settings) -> typing.AsyncIterator[S3Client]: exit_stack = contextlib.AsyncExitStack() session_client = session.client( "s3", - endpoint_url=s3_settings.S3_ENDPOINT, + endpoint_url=f"{s3_settings.S3_ENDPOINT}", aws_access_key_id=s3_settings.S3_ACCESS_KEY, aws_secret_access_key=s3_settings.S3_SECRET_KEY, region_name=s3_settings.S3_REGION, config=Config(signature_version="s3v4"), ) assert isinstance(session_client, ClientCreatorContext) - client = typing.cast(S3Client, await exit_stack.enter_async_context(session_client)) # type: ignore[arg-type] + client = typing.cast(S3Client, await exit_stack.enter_async_context(session_client)) # type: ignore[arg-type] yield client diff --git a/packages/simcore-sdk/tests/integration/test_node_ports_common_aws_s3_cli.py b/packages/simcore-sdk/tests/integration/test_node_ports_common_aws_s3_cli.py index 0c0c03b0363..717a428a1ed 100644 --- a/packages/simcore-sdk/tests/integration/test_node_ports_common_aws_s3_cli.py +++ b/packages/simcore-sdk/tests/integration/test_node_ports_common_aws_s3_cli.py @@ -50,7 +50,9 @@ async def cleanup_bucket_after_test( yield - async with session.client("s3", endpoint_url=aws_s3_cli_settings.AWS_S3_CLI_S3.S3_ENDPOINT) as s3_client: # type: ignore + async with session.client( + "s3", endpoint_url=f"{aws_s3_cli_settings.AWS_S3_CLI_S3.S3_ENDPOINT}" + ) as s3_client: # List all object versions paginator = s3_client.get_paginator("list_object_versions") async for page in paginator.paginate( diff --git a/packages/simcore-sdk/tests/integration/test_node_ports_common_r_clone.py b/packages/simcore-sdk/tests/integration/test_node_ports_common_r_clone.py index 5d728aad51d..c94fc524bec 100644 --- a/packages/simcore-sdk/tests/integration/test_node_ports_common_r_clone.py +++ b/packages/simcore-sdk/tests/integration/test_node_ports_common_r_clone.py @@ -51,7 +51,9 @@ async def cleanup_bucket_after_test( yield - async with session.client("s3", endpoint_url=r_clone_settings.R_CLONE_S3.S3_ENDPOINT) as s3_client: # type: ignore + async with session.client( + "s3", endpoint_url=f"{r_clone_settings.R_CLONE_S3.S3_ENDPOINT}" + ) as s3_client: # List all object versions paginator = s3_client.get_paginator("list_object_versions") async for page in paginator.paginate( diff --git a/services/dynamic-sidecar/tests/integration/test_modules_long_running_tasks.py b/services/dynamic-sidecar/tests/integration/test_modules_long_running_tasks.py index a1b64635e58..cb5631ec20d 100644 --- a/services/dynamic-sidecar/tests/integration/test_modules_long_running_tasks.py +++ b/services/dynamic-sidecar/tests/integration/test_modules_long_running_tasks.py @@ -313,7 +313,7 @@ async def s3_client(s3_settings: S3Settings) -> AsyncIterable[S3Client]: session = aioboto3.Session() session_client = session.client( "s3", - endpoint_url=s3_settings.S3_ENDPOINT, + endpoint_url=f"{s3_settings.S3_ENDPOINT}", aws_access_key_id=s3_settings.S3_ACCESS_KEY, aws_secret_access_key=s3_settings.S3_SECRET_KEY, region_name=s3_settings.S3_REGION,