Skip to content

Commit

Permalink
resolve trino container host with testcontainers
Browse files Browse the repository at this point in the history
Signed-off-by: tokoko <[email protected]>
  • Loading branch information
tokoko committed Feb 18, 2024
1 parent 1e3e39b commit aa4f316
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ def __init__(
"must be include into pytest plugins"
)
self.exposed_port = self.container.get_exposed_port("8080")
self.container_host = self.container.get_container_host_ip()
self.client = Trino(
user="user",
catalog="memory",
host="localhost",
host=self.container_host,
port=self.exposed_port,
source="trino-python-client",
http_scheme="http",
Expand Down Expand Up @@ -123,7 +124,7 @@ def get_prefixed_table_name(self, suffix: str) -> str:

def create_offline_store_config(self) -> FeastConfigBaseModel:
return TrinoOfflineStoreConfig(
host="localhost",
host=self.container_host,
port=self.exposed_port,
catalog="memory",
dataset=self.project_name,
Expand Down

0 comments on commit aa4f316

Please sign in to comment.