Skip to content

Commit 9b50078

Browse files
committed
Fix test S3 config
1 parent 74e346b commit 9b50078

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.env.docker.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ TEST_S3_PORT_FOR_WORKER=9000
66
TEST_S3_ACCESS_KEY=syncmaster
77
TEST_S3_SECRET_KEY=123UsedForTestOnly@!
88
TEST_S3_BUCKET=syncmaster
9+
TEST_S3_BUCKET_style=path
910

1011
TEST_POSTGRES_HOST_FOR_CONFTEST=test-postgres
1112
TEST_POSTGRES_PORT_FOR_CONFTEST=5432

.env.local.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export TEST_S3_PORT_FOR_WORKER=9000
66
export TEST_S3_ACCESS_KEY=syncmaster
77
export TEST_S3_SECRET_KEY=123UsedForTestOnly@!
88
export TEST_S3_BUCKET=syncmaster
9+
export TEST_S3_BUCKET_style=path
910

1011
export TEST_POSTGRES_HOST_FOR_CONFTEST=localhost
1112
export TEST_POSTGRES_PORT_FOR_CONFTEST=5433

syncmaster/dto/connections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class IcebergRESTCatalogS3ConnectionDTO(ConnectionDTO):
7979
s3_warehouse_path: str
8080
s3_host: str
8181
s3_bucket: str
82-
s3_bucket_style: str
82+
s3_bucket_style: Literal["domain", "path"]
8383
s3_region: str
8484
s3_access_key: str
8585
s3_secret_key: str
@@ -105,7 +105,7 @@ class S3ConnectionDTO(ConnectionDTO):
105105
access_key: str
106106
secret_key: str
107107
bucket: str
108-
bucket_style: str
108+
bucket_style: Literal["domain", "path"]
109109
additional_params: dict
110110
region: str | None = None
111111
protocol: str = "https"

tests/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-FileCopyrightText: 2023-2024 MTS PJSC
22
# SPDX-License-Identifier: Apache-2.0
3+
from typing import Literal
4+
35
from pydantic import model_validator
46
from pydantic_settings import BaseSettings
57

@@ -56,7 +58,7 @@ class TestSettings(BaseSettings):
5658
TEST_ICEBERG_METASTORE_PASSWORD: str
5759
TEST_ICEBERG_S3_WAREHOUSE_PATH: str
5860
TEST_ICEBERG_S3_REGION: str
59-
TEST_ICEBERG_S3_BUCKET_STYLE: bool = True
61+
TEST_ICEBERG_S3_BUCKET_STYLE: Literal["domain", "path"] = "path"
6062

6163
TEST_HDFS_HOST: str
6264
TEST_HDFS_WEBHDFS_PORT: int
@@ -67,6 +69,7 @@ class TestSettings(BaseSettings):
6769
TEST_S3_HOST_FOR_WORKER: str
6870
TEST_S3_PORT_FOR_WORKER: int
6971
TEST_S3_BUCKET: str
72+
TEST_S3_BUCKET_STYLE: Literal["domain", "path"] = "path"
7073
TEST_S3_ACCESS_KEY: str
7174
TEST_S3_SECRET_KEY: str
7275
TEST_S3_PROTOCOL: str = "http"

0 commit comments

Comments
 (0)