From 9af3a2f7f7cb48cceeff12fbe974903e065874b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4t=C3=A4l=C3=A4?= <63060811+sebastian-hatala-leanix@users.noreply.github.com> Date: Wed, 9 Jun 2021 22:24:05 +0200 Subject: [PATCH] unset default for host in pg conn url the host will correctly be assigned in `_create_connection_url` using `get_container_host_ip` --- testcontainers/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers/postgres.py b/testcontainers/postgres.py index 502b70c12..c60c60b39 100644 --- a/testcontainers/postgres.py +++ b/testcontainers/postgres.py @@ -46,7 +46,7 @@ def _configure(self): self.with_env("POSTGRES_PASSWORD", self.POSTGRES_PASSWORD) self.with_env("POSTGRES_DB", self.POSTGRES_DB) - def get_connection_url(self, host="localhost"): + def get_connection_url(self, host=None): return super()._create_connection_url(dialect="postgresql+psycopg2", username=self.POSTGRES_USER, password=self.POSTGRES_PASSWORD,