🐛 fix: BDD tests PostgreSQL connection for native execution
- Enhance getPostgresHost() to detect Docker vs native execution - Use localhost for native execution (PostgreSQL port mapping) - Use container name for Docker execution - Fix local CI/CD script to set correct DLC_DATABASE_HOST - Ensure BDD tests can connect in both Docker and native modes Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -75,7 +75,12 @@ if [ "$HAS_DOCKER" = true ]; then
|
||||
done
|
||||
|
||||
# Set PostgreSQL environment variables for BDD tests
|
||||
export DLC_DATABASE_HOST="dance-lessons-coach-postgres"
|
||||
# Use container name for Docker, localhost for native (port mapping)
|
||||
if [ "$HAS_DOCKER" = true ]; then
|
||||
export DLC_DATABASE_HOST="dance-lessons-coach-postgres"
|
||||
else
|
||||
export DLC_DATABASE_HOST="localhost"
|
||||
fi
|
||||
export DLC_DATABASE_PORT=5432
|
||||
export DLC_DATABASE_USER=postgres
|
||||
export DLC_DATABASE_PASSWORD=postgres
|
||||
|
||||
Reference in New Issue
Block a user