Skip to content

Commit 804a468

Browse files
committed
test: set region when creating table bucket
1 parent 9d673b0 commit 804a468

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/catalog/test_s3tables.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ def aws_region() -> str:
4747

4848

4949
@pytest.fixture
50-
def table_bucket_arn(monkeypatch: pytest.MonkeyPatch, moto_endpoint_url: str) -> str:
50+
def table_bucket_arn(monkeypatch: pytest.MonkeyPatch, moto_endpoint_url: str, aws_region: str) -> str:
5151
monkeypatch.setenv("AWS_ENDPOINT_URL", moto_endpoint_url)
5252

5353
prefix = "pyiceberg-table-bucket-"
5454
random_tag = "".join(choice(string.ascii_letters) for _ in range(12))
5555
name = (prefix + random_tag).lower()
56-
table_bucket_arn = boto3.client("s3tables", endpoint_url=moto_endpoint_url).create_table_bucket(name=name)["arn"]
56+
table_bucket_arn = boto3.client("s3tables", endpoint_url=moto_endpoint_url, region_name=aws_region).create_table_bucket(
57+
name=name
58+
)["arn"]
5759
return table_bucket_arn
5860

5961

0 commit comments

Comments
 (0)