Skip to content

Commit

Permalink
test: add tests for Drupal 7 and non-Drupal systems
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainweb committed Jan 27, 2022
1 parent 1da77a7 commit a3107fa
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand All @@ -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 ]
}

0 comments on commit a3107fa

Please sign in to comment.