Skip to content

Commit fcbad41

Browse files
author
Sebastian Hätälä
authored
unset default for host in pg conn url (#145)
the host will correctly be assigned in `_create_connection_url` using `get_container_host_ip`
1 parent 50f8d8c commit fcbad41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcontainers/postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _configure(self):
4646
self.with_env("POSTGRES_PASSWORD", self.POSTGRES_PASSWORD)
4747
self.with_env("POSTGRES_DB", self.POSTGRES_DB)
4848

49-
def get_connection_url(self, host="localhost"):
49+
def get_connection_url(self, host=None):
5050
return super()._create_connection_url(dialect="postgresql+psycopg2",
5151
username=self.POSTGRES_USER,
5252
password=self.POSTGRES_PASSWORD,

0 commit comments

Comments
 (0)