🐛 fix: ensure clean BDD database creation between test runs
- Add DROP DATABASE IF EXISTS before creating BDD test database - Prevents errors when database already exists from previous runs - Ensures clean test environment for each run Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -34,6 +34,8 @@ if ! docker ps --format '{{.Names}}' | grep -q "^dance-lessons-coach-postgres$";
|
|||||||
|
|
||||||
# Create BDD test database (separate from development database)
|
# Create BDD test database (separate from development database)
|
||||||
echo "📦 Creating BDD test database..."
|
echo "📦 Creating BDD test database..."
|
||||||
|
# Drop database if it exists, then create fresh
|
||||||
|
docker exec dance-lessons-coach-postgres psql -U postgres -c "DROP DATABASE IF EXISTS dance_lessons_coach_bdd_test;"
|
||||||
if docker exec dance-lessons-coach-postgres createdb -U postgres dance_lessons_coach_bdd_test; then
|
if docker exec dance-lessons-coach-postgres createdb -U postgres dance_lessons_coach_bdd_test; then
|
||||||
echo "✅ BDD test database created successfully!"
|
echo "✅ BDD test database created successfully!"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user