Skip to content

Commit f60d27b

Browse files
committed
parametrize test to use host/path addressing
1 parent 122d341 commit f60d27b

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
@@ -40,13 +40,17 @@ def _start(config: dict = None):
4040

4141

4242
@pytest.mark.parametrize("metadata_gzip", [True, False])
43-
def test_s3_requests(start_aws_proxy, s3_create_bucket, metadata_gzip):
43+
@pytest.mark.parametrize("host_addressing", [True, False])
44+
def test_s3_requests(start_aws_proxy, s3_create_bucket, metadata_gzip, host_addressing):
4445
# start proxy
4546
config = ProxyConfig(services={"s3": {"resources": ".*"}}, bind_host=PROXY_BIND_HOST)
4647
start_aws_proxy(config)
4748

4849
# create clients
49-
s3_client = connect_to().s3
50+
if host_addressing:
51+
s3_client = connect_to(endpoint_url="http://s3.localhost.localstack.cloud:4566").s3
52+
else:
53+
s3_client = connect_to(endpoint_url="http://localhost:4566").s3
5054
s3_client_aws = boto3.client("s3")
5155

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

0 commit comments

Comments
 (0)