Skip to content

Commit 0bcbb53

Browse files
committed
force host-based addressing in S3 client config
1 parent f60d27b commit 0bcbb53

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aws-replicator/tests/test_proxy_requests.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import boto3
66
import pytest
7+
from botocore.client import Config
78
from botocore.exceptions import ClientError
89
from localstack.aws.connect import connect_to
910
from localstack.utils.aws.arns import sqs_queue_arn, sqs_queue_url_for_arn
@@ -48,9 +49,12 @@ def test_s3_requests(start_aws_proxy, s3_create_bucket, metadata_gzip, host_addr
4849

4950
# create clients
5051
if host_addressing:
51-
s3_client = connect_to(endpoint_url="http://s3.localhost.localstack.cloud:4566").s3
52+
s3_client = connect_to(
53+
endpoint_url="http://s3.localhost.localstack.cloud:4566",
54+
config=Config(s3={"addressing_style": "virtual"}),
55+
).s3
5256
else:
53-
s3_client = connect_to(endpoint_url="http://localhost:4566").s3
57+
s3_client = connect_to().s3
5458
s3_client_aws = boto3.client("s3")
5559

5660
# list buckets to assert that proxy is up and running

0 commit comments

Comments
 (0)