Skip to content

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo committed Nov 14, 2024
1 parent 6c6d8bd commit 1e9ff2d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/aws-library/src/aws_library/s3/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/pytest-simcore/src/pytest_simcore/aws_s3_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1e9ff2d

Please sign in to comment.