Allow specifying the Postgres database's port when running unit tests with Postgres. (#12376)

This commit is contained in:
reivilibre 2022-04-05 12:44:48 +01:00 committed by GitHub
parent efdbcfd6af
commit 708d88b1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 3 deletions

View file

@ -76,6 +76,7 @@ from tests.utils import (
POSTGRES_BASE_DB,
POSTGRES_HOST,
POSTGRES_PASSWORD,
POSTGRES_PORT,
POSTGRES_USER,
SQLITE_PERSIST_DB,
USE_POSTGRES_FOR_TESTS,
@ -747,6 +748,7 @@ def setup_test_homeserver(
"host": POSTGRES_HOST,
"password": POSTGRES_PASSWORD,
"user": POSTGRES_USER,
"port": POSTGRES_PORT,
"cp_min": 1,
"cp_max": 5,
},
@ -786,6 +788,7 @@ def setup_test_homeserver(
database=POSTGRES_BASE_DB,
user=POSTGRES_USER,
host=POSTGRES_HOST,
port=POSTGRES_PORT,
password=POSTGRES_PASSWORD,
)
db_conn.autocommit = True
@ -833,6 +836,7 @@ def setup_test_homeserver(
database=POSTGRES_BASE_DB,
user=POSTGRES_USER,
host=POSTGRES_HOST,
port=POSTGRES_PORT,
password=POSTGRES_PASSWORD,
)
db_conn.autocommit = True