From a3107fa783063ea6867b7496fd01f6508859a17a Mon Sep 17 00:00:00 2001 From: hw Date: Thu, 27 Jan 2022 13:27:56 -0500 Subject: [PATCH] test: add tests for Drupal 7 and non-Drupal systems --- tests/test.bats | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/test.bats b/tests/test.bats index 0949525..c4ab65d 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -5,8 +5,6 @@ setup() { export DDEV_NON_INTERACTIVE=true ddev delete -Oy ${PROJNAME} || true cd "${TESTDIR}" - ddev config --project-name=${PROJNAME} --project-type=drupal9 --docroot=web --create-docroot - ddev start -y } teardown() { @@ -16,6 +14,8 @@ teardown() { } @test "basic installation" { + ddev config --project-name=${PROJNAME} --project-type=drupal9 --docroot=web --create-docroot + ddev start -y cd ${TESTDIR} ddev get ${DIR} ddev restart @@ -24,3 +24,25 @@ teardown() { [ -f web/sites/default/settings.ddev.redis.php ] grep -F 'settings.ddev.redis.php' web/sites/default/settings.php } + +@test "non-Drupal installation" { + ddev config --project-name=${PROJNAME} --project-type=laravel --docroot=web --create-docroot + ddev start -y + cd ${TESTDIR} + ddev get ${DIR} + ddev restart + ddev redis-cli INFO | grep "^redis_version:6." + # Drupal configuration should not be present + [ ! -f web/sites/default/settings.ddev.redis.php ] +} + +@test "Drupal 7 installation" { + ddev config --project-name=${PROJNAME} --project-type=drupal7 --docroot=web --create-docroot + ddev start -y + cd ${TESTDIR} + ddev get ${DIR} + ddev restart + ddev redis-cli INFO | grep "^redis_version:6." + # Drupal configuration should not be present + [ ! -f web/sites/default/settings.ddev.redis.php ] +}