Skip to content

Commit 340924b

Browse files
committed
Drop existing test DB before creation in install script
Added a step to drop the database if it exists before creating it in bin/install-wp-tests.sh. This ensures a clean database state for each test run.
1 parent adf439d commit 340924b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bin/install-wp-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ install_db() {
113113
fi
114114
fi
115115

116+
# Drop database if it exists, then create it
117+
mysqladmin drop $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA --force 2>/dev/null || true
116118
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
117119
}
118120

0 commit comments

Comments
 (0)