Skip to content

Commit

Permalink
force host-based addressing in S3 client config
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer committed Sep 23, 2024
1 parent f60d27b commit 8f89e3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aws-replicator/tests/test_proxy_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import boto3
import pytest
from boto3 import Config
from botocore.exceptions import ClientError
from localstack.aws.connect import connect_to
from localstack.utils.aws.arns import sqs_queue_arn, sqs_queue_url_for_arn
Expand Down Expand Up @@ -48,9 +49,12 @@ def test_s3_requests(start_aws_proxy, s3_create_bucket, metadata_gzip, host_addr

# create clients
if host_addressing:
s3_client = connect_to(endpoint_url="http://s3.localhost.localstack.cloud:4566").s3
s3_client = connect_to(
endpoint_url="http://s3.localhost.localstack.cloud:4566",
config=Config(s3={"addressing_style": "virtual"}),
).s3
else:
s3_client = connect_to(endpoint_url="http://localhost:4566").s3
s3_client = connect_to().s3
s3_client_aws = boto3.client("s3")

# list buckets to assert that proxy is up and running
Expand Down

0 comments on commit 8f89e3c

Please sign in to comment.