Skip to content

Commit 525a9fd

Browse files
committed
test(environment): use default test database settings for BDD runs
1 parent 2932721 commit 525a9fd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/features/environment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import random
1818
from datetime import datetime, timedelta
1919

20-
# Lock test database before any db module imports
21-
# Ensures BDD tests only use ocotilloapi_test, never ocotilloapi_dev
22-
os.environ["POSTGRES_DB"] = "ocotilloapi_test"
23-
os.environ["POSTGRES_PORT"] = "5432"
20+
# Default BDD runs to the local test database before any db module imports.
21+
# Allow explicit CI/local environment configuration to override these values.
22+
os.environ.setdefault("POSTGRES_DB", "ocotilloapi_test")
23+
os.environ.setdefault("POSTGRES_PORT", "5432")
2424

2525
from alembic import command
2626
from alembic.config import Config

0 commit comments

Comments
 (0)