From 06dd090ab26192c29c45e95ba63c097dcab8ed8a Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Mon, 16 Mar 2020 12:27:39 +0100 Subject: [PATCH] Create database, if not exists. --- lib/stages/run_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/stages/run_tests.sh b/lib/stages/run_tests.sh index 5808550..d535e1a 100644 --- a/lib/stages/run_tests.sh +++ b/lib/stages/run_tests.sh @@ -18,6 +18,8 @@ _stage_run_tests() { fi if [[ -f ${docroot}/${DRUPAL_TESTING_TEST_DUMP_FILE} ]]; then + # Database needs to be initialized, if the run was split into a build and a test run. + mysql --host="${DRUPAL_TESTING_DATABASE_HOST}" --port="${DRUPAL_TESTING_DATABASE_PORT}" --user="${DRUPAL_TESTING_DATABASE_USER}" --password="${DRUPAL_TESTING_DATABASE_PASSWORD}" -e "CREATE DATABASE IF NOT EXISTS ${DRUPAL_TESTING_DATABASE_NAME};" export thunderDumpFile=${docroot}/${DRUPAL_TESTING_TEST_DUMP_FILE} fi