fix(tests): use random port for pg0 in tests to avoid port conflicts (#801)

pg0 supports auto-assigning a free port when port=None. This avoids
test failures when port 5556 is already in use by another process.
This commit is contained in:
Nicolò Boschi 2026-03-31 09:38:46 +02:00 committed by GitHub
parent 1f5dc8bd15
commit 865fb91298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ from hindsight_api.pg0 import EmbeddedPostgres
# Default pg0 instance configuration for tests # Default pg0 instance configuration for tests
DEFAULT_PG0_INSTANCE_NAME = "hindsight-test" DEFAULT_PG0_INSTANCE_NAME = "hindsight-test"
DEFAULT_PG0_PORT = 5556 DEFAULT_PG0_PORT = None
# Load environment variables from .env at the start of test session # Load environment variables from .env at the start of test session