Skip to content

Commit 217cf1e

Browse files
committed
Add create-database command check to test suite
- Added check to verify 'ddev create-database secondary' command works - Added verification that secondary database is accessible via mysql command - Tests run after install from directory checks
1 parent c704631 commit 217cf1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test.bats

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,15 @@ check_drupal_admin_access() {
257257
# Check the project's homepage is accessible.
258258
check_project_homepage_is_browsable
259259
check_drupal_admin_access
260+
261+
# Check create-database command
262+
echo -n "Checking if create-database command works..."
263+
run ddev create-database secondary
264+
assert_success
265+
echo " Ok."
266+
267+
echo -n "Checking if secondary database is accessible..."
268+
run bash -c 'echo "SHOW TABLES;" | ddev mysql --database="secondary"'
269+
assert_success
270+
echo " Ok."
260271
}

0 commit comments

Comments
 (0)