From 96e8fa114770b2dcdad0c081b1b3a7bb815520af Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 1 May 2024 15:45:00 -0600 Subject: [PATCH 01/12] fix: Install drush without affecting git index --- commands/web/drush | 14 +++++++++++++ core-dev/install_drush.sh | 41 +++++++++++++++++++++++++++++++++++++++ install.yaml | 2 ++ 3 files changed, 57 insertions(+) create mode 100755 commands/web/drush create mode 100755 core-dev/install_drush.sh diff --git a/commands/web/drush b/commands/web/drush new file mode 100755 index 0000000..225729b --- /dev/null +++ b/commands/web/drush @@ -0,0 +1,14 @@ +#!/bin/bash + +#ddev-generated +## Description: Run drush CLI inside the web container, installing it if necessary +## Usage: drush [flags] [args] +## Example: "ddev drush uli" or "ddev drush sql-cli" or "ddev drush --version" +## ProjectTypes: drupal7,drupal8,drupal9,drupal10,drupal,backdrop +## ExecRaw: true + +if ! command -v drush >/dev/null; then + echo "drush is not yet installed. Installing it...'" + .ddev/core-dev/install_drush.sh +fi +drush "$@" diff --git a/core-dev/install_drush.sh b/core-dev/install_drush.sh new file mode 100755 index 0000000..f8d9e03 --- /dev/null +++ b/core-dev/install_drush.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +#ddev-generated +# This script installs drush/drush without changing the git +# status of the Drupal checkout + +set -eu -o pipefail + +if command -v drush >/dev/null; then + echo "drush is already installed, taking no action. You can remove it if you want to reinstall" + exit +fi + +echo "Installing drush without affecting git status" + +# Make certain that we have something staged so we can create stash +touch .makedrush.txt +git add .makedrush.txt + +# Save the stash, which will include anything people were doing +# plus the .makedrush.txt. This gets us back to "no changes" +# in `git status` +git stash + +# Install drush +composer require drush/drush + +# Roll back to what we started with. Cleans up +# composer.* and anything else that the drush install changes +# But vendor directory is untouched since +# it's gitignored +git reset --hard + +# Restore anything that might have been staged +# prior to the start +git stash apply + +# Get rid of our dummy file +git rm -f .makedrush.txt + +echo "drush/drush is installed in $(which drush)" diff --git a/install.yaml b/install.yaml index 35cf024..2424d76 100644 --- a/install.yaml +++ b/install.yaml @@ -8,8 +8,10 @@ project_files: - core-dev/phpunit-firefox.xml - core-dev/phpunit-chrome.xml - commands/web/drupal + - commands/web/drush - commands/web/phpunit - commands/web/nightwatch + - core-dev/install_drush.sh - core-dev/gitignore - core-dev/.env - core-dev/src/Command/AdminLoginCommand.php From 3fac99170cb9502e91f210e338a7ad59f39ae1aa Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 23 May 2024 13:07:24 -0600 Subject: [PATCH 02/12] Fix merge conflict --- core-dev/gitignore | 3 ++- tests/test.bats | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/core-dev/gitignore b/core-dev/gitignore index 478bb7d..fca00cc 100644 --- a/core-dev/gitignore +++ b/core-dev/gitignore @@ -6,4 +6,5 @@ /sites/simpletest /sites/default/files /vendor -test_output \ No newline at end of file +test_output +*.orig diff --git a/tests/test.bats b/tests/test.bats index 09b4304..5e05f83 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -2,24 +2,38 @@ setup() { set -eu -o pipefail export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." export TESTDIR=~/tmp/test-ddev-drupal-core-dev - mkdir -p $TESTDIR - export PROJNAME=ddev-drupal-core-dev + rm -rf ${TESTDIR} + mkdir -p ${TESTDIR} + export PROJNAME=test-ddev-drupal-core-dev export DDEV_NON_INTERACTIVE=true ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} cd "${TESTDIR}" + mv vendor /tmp/vendor.bak + git init && git add . >/dev/null && git commit -m "current" >/dev/null + mv /tmp/vendor.bak vendor ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp ddev config --update ddev start -y >/dev/null + ddev composer install >/dev/null } -health_checks() { - ddev exec "curl -s chrome:7900" | grep "noVNC" - ddev exec "curl -s firefox:7901" | grep "noVNC" +base_checks() { + ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null + ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php } +drush_checks() { + # Make sure there's nothing in the git index before drush install + git diff --cached --quiet + ddev drush st + # Make sure there's nothing after the drush install + git diff --cached --quiet || (echo "git index has been touched" && exit 2) + ddev drush si -y --account-pass=admin +} + teardown() { set -eu -o pipefail cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) @@ -33,7 +47,8 @@ teardown() { echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 ddev get ${DIR} ddev restart - health_checks + base_checks + drush_checks } #TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support From 87157555b1154f333b4fc0e73335f23e3e4f5061 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 1 May 2024 17:25:59 -0600 Subject: [PATCH 03/12] Add required git user.name etc --- tests/test.bats | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test.bats b/tests/test.bats index 5e05f83..11e4241 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -11,6 +11,8 @@ setup() { tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} cd "${TESTDIR}" mv vendor /tmp/vendor.bak + git config --global user.email "example@example.com" + git config --global user.name "Example Example" git init && git add . >/dev/null && git commit -m "current" >/dev/null mv /tmp/vendor.bak vendor ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp From cdc627c480732f375a47586821460f861573119f Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 1 May 2024 18:37:24 -0600 Subject: [PATCH 04/12] @penyaskito suggestions, thanks! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Christian López Espínola --- core-dev/install_drush.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-dev/install_drush.sh b/core-dev/install_drush.sh index f8d9e03..0ca2ba6 100755 --- a/core-dev/install_drush.sh +++ b/core-dev/install_drush.sh @@ -23,7 +23,7 @@ git add .makedrush.txt git stash # Install drush -composer require drush/drush +composer require drush/drush --with-dependencies # Roll back to what we started with. Cleans up # composer.* and anything else that the drush install changes @@ -33,7 +33,7 @@ git reset --hard # Restore anything that might have been staged # prior to the start -git stash apply +git stash pop # Get rid of our dummy file git rm -f .makedrush.txt From 793c8b27b1284b67e1eba18dd79ed7d74bfe7bdb Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 23 May 2024 13:25:43 -0600 Subject: [PATCH 05/12] Remove omit_containers --- config.ddev-drupal-core-dev.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config.ddev-drupal-core-dev.yaml b/config.ddev-drupal-core-dev.yaml index ee664a2..6c12f31 100644 --- a/config.ddev-drupal-core-dev.yaml +++ b/config.ddev-drupal-core-dev.yaml @@ -3,7 +3,6 @@ webimage_extra_packages: ["chromium-driver"] ddev_version_constraint: '>=v1.23.1' -omit_containers: ["db"] upload_dirs: # The install technique tries to remove all of sites/default/files # but with DDEV + mutagen that isn't possible. From fbb532e78006c0e82614d91d7e42a2c2623fac95 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 23 May 2024 13:34:47 -0600 Subject: [PATCH 06/12] rerun tests From 40db93613110091f915284019e3c3424423fc1ac Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Fri, 24 May 2024 07:57:12 -0600 Subject: [PATCH 07/12] run tests From 29de965362378d10b9ed2da1534c787da98797db Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Sun, 26 May 2024 07:10:49 -0600 Subject: [PATCH 08/12] run tests From 195eb35af0e9804fd5128e39b2a3fcaabc558f3f Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Wed, 1 May 2024 16:40:20 -0600 Subject: [PATCH 09/12] Improve tests to use drush and check git index --- tests/test.bats | 130 ++++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/tests/test.bats b/tests/test.bats index 11e4241..3f54ef5 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -1,65 +1,65 @@ -setup() { - set -eu -o pipefail - export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." - export TESTDIR=~/tmp/test-ddev-drupal-core-dev - rm -rf ${TESTDIR} - mkdir -p ${TESTDIR} - export PROJNAME=test-ddev-drupal-core-dev - export DDEV_NON_INTERACTIVE=true - ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true - curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz - tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} - cd "${TESTDIR}" - mv vendor /tmp/vendor.bak - git config --global user.email "example@example.com" - git config --global user.name "Example Example" - git init && git add . >/dev/null && git commit -m "current" >/dev/null - mv /tmp/vendor.bak vendor - ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp - ddev config --update - ddev start -y >/dev/null - ddev composer install >/dev/null -} - -base_checks() { - ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null - ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null - ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php -} - -drush_checks() { - # Make sure there's nothing in the git index before drush install - git diff --cached --quiet - ddev drush st - # Make sure there's nothing after the drush install - git diff --cached --quiet || (echo "git index has been touched" && exit 2) - ddev drush si -y --account-pass=admin -} - -teardown() { - set -eu -o pipefail - cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 - [ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR} -} - -@test "install from directory" { - set -eu -o pipefail - cd ${TESTDIR} - echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 - ddev get ${DIR} - ddev restart - base_checks - drush_checks -} - -#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support -#@test "install from release" { -# set -eu -o pipefail -# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) -# echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 -# ddev get justafish/ddev-drupal-core-dev -# ddev restart >/dev/null -# health_checks -#} - +setup() { + set -eu -o pipefail + export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." + export TESTDIR=~/tmp/test-ddev-drupal-core-dev + rm -rf ${TESTDIR} + mkdir -p ${TESTDIR} + export PROJNAME=test-ddev-drupal-core-dev + export DDEV_NON_INTERACTIVE=true + ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true + curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz + tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} + cd "${TESTDIR}" + mv vendor /tmp/vendor.bak + git config --global user.email "example@example.com" + git config --global user.name "Example Example" + git init && git add . >/dev/null && git commit -m "current" >/dev/null + mv /tmp/vendor.bak vendor + ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp + ddev config --update + ddev start -y >/dev/null + ddev composer install >/dev/null +} + +base_checks() { + ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null + ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null + ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +} + +drush_checks() { + # Make sure there's nothing in the git index before drush install + git diff --cached --quiet + ddev drush st + # Make sure there's nothing after the drush install + git diff --cached --quiet || (echo "git index has been touched" && exit 2) + ddev drush si -y --account-pass=admin +} + +teardown() { + set -eu -o pipefail + cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) + ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 + [ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR} +} + +@test "install from directory" { + set -eu -o pipefail + cd ${TESTDIR} + echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 + ddev get ${DIR} + ddev restart + base_checks + drush_checks +} + +#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support +#@test "install from release" { +# set -eu -o pipefail +# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) +# echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 +# ddev get justafish/ddev-drupal-core-dev +# ddev restart >/dev/null +# health_checks +#} + From 66a2631089f64454c499b11c3e8081a82ecaed87 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 2 May 2024 09:52:38 -0600 Subject: [PATCH 10/12] Add config.ddev-drupal-core-dev.yaml from waiting PR This is part of https://github.com/justafish/ddev-drupal-core-dev/pull/31 Rebase will be required when that goes in. --- config.ddev-drupal-core-dev.yaml | 20 ++++---- install.yaml | 80 ++++++++++++++++---------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/config.ddev-drupal-core-dev.yaml b/config.ddev-drupal-core-dev.yaml index 6c12f31..d6bcda1 100644 --- a/config.ddev-drupal-core-dev.yaml +++ b/config.ddev-drupal-core-dev.yaml @@ -1,10 +1,10 @@ -# #ddev-generated -# This file is placed by the justafish/ddev-drupal-core-dev addon. - -webimage_extra_packages: ["chromium-driver"] -ddev_version_constraint: '>=v1.23.1' -upload_dirs: -# The install technique tries to remove all of sites/default/files -# but with DDEV + mutagen that isn't possible. -# so just redirect the upload_dirs. - - .ddev/tmp +# #ddev-generated +# This file is placed by the justafish/ddev-drupal-core-dev addon. + +webimage_extra_packages: ["chromium-driver"] +ddev_version_constraint: '>=v1.23.1' +upload_dirs: +# The install technique tries to remove all of sites/default/files +# but with DDEV + mutagen that isn't possible. +# so just redirect the upload_dirs. + - .ddev/tmp diff --git a/install.yaml b/install.yaml index 2424d76..d46bac3 100644 --- a/install.yaml +++ b/install.yaml @@ -1,40 +1,40 @@ -# Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml - -name: ddev-drupal-core-dev - -project_files: - - config.ddev-drupal-core-dev.yaml - - docker-compose.core-dev-selenium.yaml - - core-dev/phpunit-firefox.xml - - core-dev/phpunit-chrome.xml - - commands/web/drupal - - commands/web/drush - - commands/web/phpunit - - commands/web/nightwatch - - core-dev/install_drush.sh - - core-dev/gitignore - - core-dev/.env - - core-dev/src/Command/AdminLoginCommand.php - - core-dev/src/Command/BootCommand.php - - core-dev/src/Command/CacheCommand.php - - core-dev/src/Command/TestCommand.php - - core-dev/src/Command/TestBrowserCommand.php - - core-dev/src/Command/UninstallCommand.php - -post_install_actions: - - cp core-dev/phpunit-chrome.xml ../core/phpunit.xml - - perl -pi -e "s|DRUPAL_CORE_DDEV_URL|$DDEV_PRIMARY_URL|g" ../core/phpunit.xml - - cp core-dev/.env ../core/.env - - cp core-dev/gitignore ../.gitignore - - mkdir -p ../test_output - - chmod +w ../test_output - - cd ../core && ddev yarn - -removal_actions: - - | - for item in ../core/phpunit.xml ../core/.env ../.gitignore; do - if grep '#ddev-generated' ${item} >/dev/null; then - rm -f ${item} - fi - done - - rm -rf ../test_output +# Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml + +name: ddev-drupal-core-dev + +project_files: + - config.ddev-drupal-core-dev.yaml + - docker-compose.core-dev-selenium.yaml + - core-dev/phpunit-firefox.xml + - core-dev/phpunit-chrome.xml + - commands/web/drupal + - commands/web/drush + - commands/web/phpunit + - commands/web/nightwatch + - core-dev/install_drush.sh + - core-dev/gitignore + - core-dev/.env + - core-dev/src/Command/AdminLoginCommand.php + - core-dev/src/Command/BootCommand.php + - core-dev/src/Command/CacheCommand.php + - core-dev/src/Command/TestCommand.php + - core-dev/src/Command/TestBrowserCommand.php + - core-dev/src/Command/UninstallCommand.php + +post_install_actions: + - cp core-dev/phpunit-chrome.xml ../core/phpunit.xml + - perl -pi -e "s|DRUPAL_CORE_DDEV_URL|$DDEV_PRIMARY_URL|g" ../core/phpunit.xml + - cp core-dev/.env ../core/.env + - cp core-dev/gitignore ../.gitignore + - mkdir -p ../test_output + - chmod +w ../test_output + - cd ../core && ddev yarn + +removal_actions: + - | + for item in ../core/phpunit.xml ../core/.env ../.gitignore; do + if grep '#ddev-generated' ${item} >/dev/null; then + rm -f ${item} + fi + done + - rm -rf ../test_output From 90eeb91e7bc4b31096fca8bac4fb46cafad9ed02 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 2 May 2024 11:45:23 -0600 Subject: [PATCH 11/12] feat: Allow installing and testing with all database types --- README.md | 163 +++++++++++++++------------- config.core-dev.yaml | 31 ++++++ core-dev/.env | 2 +- core-dev/phpunit-chrome.xml | 205 +++++++++++++++++------------------ core-dev/phpunit-firefox.xml | 205 +++++++++++++++++------------------ install.yaml | 6 +- 6 files changed, 327 insertions(+), 285 deletions(-) create mode 100644 config.core-dev.yaml diff --git a/README.md b/README.md index 2721e7e..bfbded9 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,90 @@ -# ddev-core-dev - -This is a DDEV addon for doing Drupal core development. - -We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) - -``` -git clone https://git.drupalcode.org/project/drupal.git drupal -cd drupal -ddev config --omit-containers=db --disable-settings-management -ddev start -ddev get justafish/ddev-drupal-core-dev -ddev restart -ddev composer install - -# See included commands -ddev drupal list - -# Install drupal -ddev drupal install - -# Run PHPUnit tests -ddev phpunit core/modules/sdc - -# Run Nightwatch tests (currently only runs on Chrome) -ddev nightwatch --tag core -``` - -## Nightwatch Examples - -You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 -for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is -"secret". YMMV using Firefox as core tests don't currently run on it. - -Only core tests -``` -ddev nightwatch --tag core -``` - -Skip running core tests -``` -ddev nightwatch --skiptags core -``` - -Run a single test -``` -ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js -``` - -a11y tests for both the admin and default themes -``` -ddev nightwatch --tag a11y -``` - -a11y tests for the admin theme only -``` -ddev nightwatch --tag a11y:admin -``` - -a11y tests for the default theme only -``` -ddev nightwatch --tag a11y:default -``` - -a11y test for a custom theme used as the default theme -``` -ddev nightwatch --tag a11y:default --defaultTheme bartik -``` - -a11y test for a custom admin theme -``` -ddev nightwatch --tag a11y:admin --adminTheme seven -``` +# ddev-core-dev + +This is a DDEV addon for doing Drupal core development. + +We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) + +`ddev drush` is fully supported, along with using or testing MariaDB, MySQL, and PostgreSQL databases (and Sqlite3) + + +``` +git clone https://git.drupalcode.org/project/drupal.git drupal +cd drupal +ddev config --project-type=drupal +ddev get justafish/ddev-drupal-core-dev +ddev restart +ddev composer install +ddev config --update + + +# Install drupal +ddev drush si -y --account-pass==admin + +# Run PHPUnit tests +ddev phpunit core/modules/sdc + +# Run Nightwatch tests (currently only runs on Chrome) +ddev nightwatch --tag core +``` + +## Using various database types + +By default, the DDEV default database type is used (MariaDB). + +To use another supported database type, +`ddev delete -Oy` and `ddev config --database=mysql:8.0` or `ddev config --database=postgres:16` for example. + +To use Sqlite, +``` +ddev stop +ddev config --disable-settings-management --omit-containers=db +rm -rf web/sites/default/settings*.php web/sites/default/files +ddev start +ddev drupal install +``` + +## Nightwatch Examples + +You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 +for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is +"secret". YMMV using Firefox as core tests don't currently run on it. + +Only core tests +``` +ddev nightwatch --tag core +``` + +Skip running core tests +``` +ddev nightwatch --skiptags core +``` + +Run a single test +``` +ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js +``` + +a11y tests for both the admin and default themes +``` +ddev nightwatch --tag a11y +``` + +a11y tests for the admin theme only +``` +ddev nightwatch --tag a11y:admin +``` + +a11y tests for the default theme only +``` +ddev nightwatch --tag a11y:default +``` + +a11y test for a custom theme used as the default theme +``` +ddev nightwatch --tag a11y:default --defaultTheme bartik +``` + +a11y test for a custom admin theme +``` +ddev nightwatch --tag a11y:admin --adminTheme seven +``` diff --git a/config.core-dev.yaml b/config.core-dev.yaml new file mode 100644 index 0000000..1f71985 --- /dev/null +++ b/config.core-dev.yaml @@ -0,0 +1,31 @@ +# #ddev-generated +# This file is placed by the justafish/ddev-drupal-core-dev addon. + +webimage_extra_packages: ["chromium-driver"] +ddev_version_constraint: '>=v1.23.0' +hooks: + post-start: + - exec: | + dburl='sqlite://localhost/sites/default/files/db.sqlite' + cp .ddev/core-dev/phpunit-chrome.xml core/phpunit.xml + cp .ddev/core-dev/.env core/.env + if ping -c 1 db >/dev/null 2>&1; then + case ${DDEV_DATABASE_FAMILY:-} in + mysql) + # the backslash here is to prevent perl from eating the @ + dburl='mysql://db:db\@db/db' + ;; + postgres) + dburl='pgsql://db:db\@db/db' + ;; + esac + fi + perl -pi -e "s|SIMPLETEST_DB_VALUE|${dburl}|g" core/phpunit.xml + perl -pi -e "s|DRUPAL_TEST_DB_URL_VALUE|${dburl}|g" core/.env + perl -pi -e "s|DRUPAL_CORE_DDEV_URL|${DDEV_PRIMARY_URL}|g" core/phpunit.xml + +upload_dirs: + # The install technique tries to remove all of sites/default/files + # but with DDEV + mutagen that isn't possible. + # so just redirect the upload_dirs. + - .ddev/tmp diff --git a/core-dev/.env b/core-dev/.env index 9a54fb3..2b5901d 100644 --- a/core-dev/.env +++ b/core-dev/.env @@ -19,7 +19,7 @@ DRUPAL_TEST_BASE_URL=http://web # By default we use sqlite as database. Use # mysql://username:password@localhost/databasename#table_prefix for mysql. -DRUPAL_TEST_DB_URL=sqlite://localhost/sites/default/files/db.sqlite +DRUPAL_TEST_DB_URL=DRUPAL_TEST_DB_URL_VALUE ############# # Webdriver # diff --git a/core-dev/phpunit-chrome.xml b/core-dev/phpunit-chrome.xml index a4888bd..8e5e47c 100644 --- a/core-dev/phpunit-chrome.xml +++ b/core-dev/phpunit-chrome.xml @@ -1,103 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ./tests/TestSuites/UnitTestSuite.php - - - ./tests/TestSuites/KernelTestSuite.php - - - ./tests/TestSuites/FunctionalTestSuite.php - - - ./tests/TestSuites/FunctionalJavascriptTestSuite.php - - - ./tests/TestSuites/BuildTestSuite.php - - - - - - - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - ./lib/** - ./modules/** - ../modules/** - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ./tests/TestSuites/UnitTestSuite.php + + + ./tests/TestSuites/KernelTestSuite.php + + + ./tests/TestSuites/FunctionalTestSuite.php + + + ./tests/TestSuites/FunctionalJavascriptTestSuite.php + + + ./tests/TestSuites/BuildTestSuite.php + + + + + + + + + + ./includes + ./lib + ./modules + ../modules + ../sites + + + ./modules/*/src/Tests + ./modules/*/tests + ../modules/*/src/Tests + ../modules/*/tests + ../modules/*/*/src/Tests + ../modules/*/*/tests + ./lib/** + ./modules/** + ../modules/** + + + diff --git a/core-dev/phpunit-firefox.xml b/core-dev/phpunit-firefox.xml index 564f83c..109c9f7 100644 --- a/core-dev/phpunit-firefox.xml +++ b/core-dev/phpunit-firefox.xml @@ -1,103 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ./tests/TestSuites/UnitTestSuite.php - - - ./tests/TestSuites/KernelTestSuite.php - - - ./tests/TestSuites/FunctionalTestSuite.php - - - ./tests/TestSuites/FunctionalJavascriptTestSuite.php - - - ./tests/TestSuites/BuildTestSuite.php - - - - - - - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - ./lib/** - ./modules/** - ../modules/** - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ./tests/TestSuites/UnitTestSuite.php + + + ./tests/TestSuites/KernelTestSuite.php + + + ./tests/TestSuites/FunctionalTestSuite.php + + + ./tests/TestSuites/FunctionalJavascriptTestSuite.php + + + ./tests/TestSuites/BuildTestSuite.php + + + + + + + + + + ./includes + ./lib + ./modules + ../modules + ../sites + + + ./modules/*/src/Tests + ./modules/*/tests + ../modules/*/src/Tests + ../modules/*/tests + ../modules/*/*/src/Tests + ../modules/*/*/tests + ./lib/** + ./modules/** + ../modules/** + + + diff --git a/install.yaml b/install.yaml index d46bac3..b050f7a 100644 --- a/install.yaml +++ b/install.yaml @@ -3,7 +3,7 @@ name: ddev-drupal-core-dev project_files: - - config.ddev-drupal-core-dev.yaml + - config.core-dev.yaml - docker-compose.core-dev-selenium.yaml - core-dev/phpunit-firefox.xml - core-dev/phpunit-chrome.xml @@ -22,13 +22,9 @@ project_files: - core-dev/src/Command/UninstallCommand.php post_install_actions: - - cp core-dev/phpunit-chrome.xml ../core/phpunit.xml - - perl -pi -e "s|DRUPAL_CORE_DDEV_URL|$DDEV_PRIMARY_URL|g" ../core/phpunit.xml - - cp core-dev/.env ../core/.env - cp core-dev/gitignore ../.gitignore - mkdir -p ../test_output - chmod +w ../test_output - - cd ../core && ddev yarn removal_actions: - | From a963d3a3a83adbe8f815345edec1b838b4c59480 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 31 Oct 2024 11:16:00 -0600 Subject: [PATCH 12/12] Fix broken CRLF line endings --- README.md | 180 +++++++++++++-------------- config.ddev-drupal-core-dev.yaml | 20 +-- core-dev/phpunit-chrome.xml | 204 +++++++++++++++---------------- core-dev/phpunit-firefox.xml | 204 +++++++++++++++---------------- install.yaml | 72 +++++------ tests/test.bats | 130 ++++++++++---------- 6 files changed, 405 insertions(+), 405 deletions(-) diff --git a/README.md b/README.md index bfbded9..f3737cf 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,90 @@ -# ddev-core-dev - -This is a DDEV addon for doing Drupal core development. - -We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) - -`ddev drush` is fully supported, along with using or testing MariaDB, MySQL, and PostgreSQL databases (and Sqlite3) - - -``` -git clone https://git.drupalcode.org/project/drupal.git drupal -cd drupal -ddev config --project-type=drupal -ddev get justafish/ddev-drupal-core-dev -ddev restart -ddev composer install -ddev config --update - - -# Install drupal -ddev drush si -y --account-pass==admin - -# Run PHPUnit tests -ddev phpunit core/modules/sdc - -# Run Nightwatch tests (currently only runs on Chrome) -ddev nightwatch --tag core -``` - -## Using various database types - -By default, the DDEV default database type is used (MariaDB). - -To use another supported database type, -`ddev delete -Oy` and `ddev config --database=mysql:8.0` or `ddev config --database=postgres:16` for example. - -To use Sqlite, -``` -ddev stop -ddev config --disable-settings-management --omit-containers=db -rm -rf web/sites/default/settings*.php web/sites/default/files -ddev start -ddev drupal install -``` - -## Nightwatch Examples - -You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 -for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is -"secret". YMMV using Firefox as core tests don't currently run on it. - -Only core tests -``` -ddev nightwatch --tag core -``` - -Skip running core tests -``` -ddev nightwatch --skiptags core -``` - -Run a single test -``` -ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js -``` - -a11y tests for both the admin and default themes -``` -ddev nightwatch --tag a11y -``` - -a11y tests for the admin theme only -``` -ddev nightwatch --tag a11y:admin -``` - -a11y tests for the default theme only -``` -ddev nightwatch --tag a11y:default -``` - -a11y test for a custom theme used as the default theme -``` -ddev nightwatch --tag a11y:default --defaultTheme bartik -``` - -a11y test for a custom admin theme -``` -ddev nightwatch --tag a11y:admin --adminTheme seven -``` +# ddev-core-dev + +This is a DDEV addon for doing Drupal core development. + +We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work and feature requests in Issues where it's visible to all 🙏) + +`ddev drush` is fully supported, along with using or testing MariaDB, MySQL, and PostgreSQL databases (and Sqlite3) + + +``` +git clone https://git.drupalcode.org/project/drupal.git drupal +cd drupal +ddev config --project-type=drupal +ddev get justafish/ddev-drupal-core-dev +ddev restart +ddev composer install +ddev config --update + + +# Install drupal +ddev drush si -y --account-pass==admin + +# Run PHPUnit tests +ddev phpunit core/modules/sdc + +# Run Nightwatch tests (currently only runs on Chrome) +ddev nightwatch --tag core +``` + +## Using various database types + +By default, the DDEV default database type is used (MariaDB). + +To use another supported database type, +`ddev delete -Oy` and `ddev config --database=mysql:8.0` or `ddev config --database=postgres:16` for example. + +To use Sqlite, +``` +ddev stop +ddev config --disable-settings-management --omit-containers=db +rm -rf web/sites/default/settings*.php web/sites/default/files +ddev start +ddev drupal install +``` + +## Nightwatch Examples + +You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 +for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is +"secret". YMMV using Firefox as core tests don't currently run on it. + +Only core tests +``` +ddev nightwatch --tag core +``` + +Skip running core tests +``` +ddev nightwatch --skiptags core +``` + +Run a single test +``` +ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js +``` + +a11y tests for both the admin and default themes +``` +ddev nightwatch --tag a11y +``` + +a11y tests for the admin theme only +``` +ddev nightwatch --tag a11y:admin +``` + +a11y tests for the default theme only +``` +ddev nightwatch --tag a11y:default +``` + +a11y test for a custom theme used as the default theme +``` +ddev nightwatch --tag a11y:default --defaultTheme bartik +``` + +a11y test for a custom admin theme +``` +ddev nightwatch --tag a11y:admin --adminTheme seven +``` diff --git a/config.ddev-drupal-core-dev.yaml b/config.ddev-drupal-core-dev.yaml index d6bcda1..6c12f31 100644 --- a/config.ddev-drupal-core-dev.yaml +++ b/config.ddev-drupal-core-dev.yaml @@ -1,10 +1,10 @@ -# #ddev-generated -# This file is placed by the justafish/ddev-drupal-core-dev addon. - -webimage_extra_packages: ["chromium-driver"] -ddev_version_constraint: '>=v1.23.1' -upload_dirs: -# The install technique tries to remove all of sites/default/files -# but with DDEV + mutagen that isn't possible. -# so just redirect the upload_dirs. - - .ddev/tmp +# #ddev-generated +# This file is placed by the justafish/ddev-drupal-core-dev addon. + +webimage_extra_packages: ["chromium-driver"] +ddev_version_constraint: '>=v1.23.1' +upload_dirs: +# The install technique tries to remove all of sites/default/files +# but with DDEV + mutagen that isn't possible. +# so just redirect the upload_dirs. + - .ddev/tmp diff --git a/core-dev/phpunit-chrome.xml b/core-dev/phpunit-chrome.xml index 8e5e47c..b4f1a5a 100644 --- a/core-dev/phpunit-chrome.xml +++ b/core-dev/phpunit-chrome.xml @@ -1,102 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ./tests/TestSuites/UnitTestSuite.php - - - ./tests/TestSuites/KernelTestSuite.php - - - ./tests/TestSuites/FunctionalTestSuite.php - - - ./tests/TestSuites/FunctionalJavascriptTestSuite.php - - - ./tests/TestSuites/BuildTestSuite.php - - - - - - - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - ./lib/** - ./modules/** - ../modules/** - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ./tests/TestSuites/UnitTestSuite.php + + + ./tests/TestSuites/KernelTestSuite.php + + + ./tests/TestSuites/FunctionalTestSuite.php + + + ./tests/TestSuites/FunctionalJavascriptTestSuite.php + + + ./tests/TestSuites/BuildTestSuite.php + + + + + + + + + + ./includes + ./lib + ./modules + ../modules + ../sites + + + ./modules/*/src/Tests + ./modules/*/tests + ../modules/*/src/Tests + ../modules/*/tests + ../modules/*/*/src/Tests + ../modules/*/*/tests + ./lib/** + ./modules/** + ../modules/** + + + diff --git a/core-dev/phpunit-firefox.xml b/core-dev/phpunit-firefox.xml index 109c9f7..23fd617 100644 --- a/core-dev/phpunit-firefox.xml +++ b/core-dev/phpunit-firefox.xml @@ -1,102 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ./tests/TestSuites/UnitTestSuite.php - - - ./tests/TestSuites/KernelTestSuite.php - - - ./tests/TestSuites/FunctionalTestSuite.php - - - ./tests/TestSuites/FunctionalJavascriptTestSuite.php - - - ./tests/TestSuites/BuildTestSuite.php - - - - - - - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - ./lib/** - ./modules/** - ../modules/** - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ./tests/TestSuites/UnitTestSuite.php + + + ./tests/TestSuites/KernelTestSuite.php + + + ./tests/TestSuites/FunctionalTestSuite.php + + + ./tests/TestSuites/FunctionalJavascriptTestSuite.php + + + ./tests/TestSuites/BuildTestSuite.php + + + + + + + + + + ./includes + ./lib + ./modules + ../modules + ../sites + + + ./modules/*/src/Tests + ./modules/*/tests + ../modules/*/src/Tests + ../modules/*/tests + ../modules/*/*/src/Tests + ../modules/*/*/tests + ./lib/** + ./modules/** + ../modules/** + + + diff --git a/install.yaml b/install.yaml index b050f7a..2b9f2aa 100644 --- a/install.yaml +++ b/install.yaml @@ -1,36 +1,36 @@ -# Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml - -name: ddev-drupal-core-dev - -project_files: - - config.core-dev.yaml - - docker-compose.core-dev-selenium.yaml - - core-dev/phpunit-firefox.xml - - core-dev/phpunit-chrome.xml - - commands/web/drupal - - commands/web/drush - - commands/web/phpunit - - commands/web/nightwatch - - core-dev/install_drush.sh - - core-dev/gitignore - - core-dev/.env - - core-dev/src/Command/AdminLoginCommand.php - - core-dev/src/Command/BootCommand.php - - core-dev/src/Command/CacheCommand.php - - core-dev/src/Command/TestCommand.php - - core-dev/src/Command/TestBrowserCommand.php - - core-dev/src/Command/UninstallCommand.php - -post_install_actions: - - cp core-dev/gitignore ../.gitignore - - mkdir -p ../test_output - - chmod +w ../test_output - -removal_actions: - - | - for item in ../core/phpunit.xml ../core/.env ../.gitignore; do - if grep '#ddev-generated' ${item} >/dev/null; then - rm -f ${item} - fi - done - - rm -rf ../test_output +# Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml + +name: ddev-drupal-core-dev + +project_files: + - config.core-dev.yaml + - docker-compose.core-dev-selenium.yaml + - core-dev/phpunit-firefox.xml + - core-dev/phpunit-chrome.xml + - commands/web/drupal + - commands/web/drush + - commands/web/phpunit + - commands/web/nightwatch + - core-dev/install_drush.sh + - core-dev/gitignore + - core-dev/.env + - core-dev/src/Command/AdminLoginCommand.php + - core-dev/src/Command/BootCommand.php + - core-dev/src/Command/CacheCommand.php + - core-dev/src/Command/TestCommand.php + - core-dev/src/Command/TestBrowserCommand.php + - core-dev/src/Command/UninstallCommand.php + +post_install_actions: + - cp core-dev/gitignore ../.gitignore + - mkdir -p ../test_output + - chmod +w ../test_output + +removal_actions: + - | + for item in ../core/phpunit.xml ../core/.env ../.gitignore; do + if grep '#ddev-generated' ${item} >/dev/null; then + rm -f ${item} + fi + done + - rm -rf ../test_output diff --git a/tests/test.bats b/tests/test.bats index 3f54ef5..11e4241 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -1,65 +1,65 @@ -setup() { - set -eu -o pipefail - export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." - export TESTDIR=~/tmp/test-ddev-drupal-core-dev - rm -rf ${TESTDIR} - mkdir -p ${TESTDIR} - export PROJNAME=test-ddev-drupal-core-dev - export DDEV_NON_INTERACTIVE=true - ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true - curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz - tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} - cd "${TESTDIR}" - mv vendor /tmp/vendor.bak - git config --global user.email "example@example.com" - git config --global user.name "Example Example" - git init && git add . >/dev/null && git commit -m "current" >/dev/null - mv /tmp/vendor.bak vendor - ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp - ddev config --update - ddev start -y >/dev/null - ddev composer install >/dev/null -} - -base_checks() { - ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null - ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null - ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php -} - -drush_checks() { - # Make sure there's nothing in the git index before drush install - git diff --cached --quiet - ddev drush st - # Make sure there's nothing after the drush install - git diff --cached --quiet || (echo "git index has been touched" && exit 2) - ddev drush si -y --account-pass=admin -} - -teardown() { - set -eu -o pipefail - cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 - [ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR} -} - -@test "install from directory" { - set -eu -o pipefail - cd ${TESTDIR} - echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 - ddev get ${DIR} - ddev restart - base_checks - drush_checks -} - -#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support -#@test "install from release" { -# set -eu -o pipefail -# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) -# echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 -# ddev get justafish/ddev-drupal-core-dev -# ddev restart >/dev/null -# health_checks -#} - +setup() { + set -eu -o pipefail + export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.." + export TESTDIR=~/tmp/test-ddev-drupal-core-dev + rm -rf ${TESTDIR} + mkdir -p ${TESTDIR} + export PROJNAME=test-ddev-drupal-core-dev + export DDEV_NON_INTERACTIVE=true + ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true + curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz + tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR} + cd "${TESTDIR}" + mv vendor /tmp/vendor.bak + git config --global user.email "example@example.com" + git config --global user.name "Example Example" + git init && git add . >/dev/null && git commit -m "current" >/dev/null + mv /tmp/vendor.bak vendor + ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp + ddev config --update + ddev start -y >/dev/null + ddev composer install >/dev/null +} + +base_checks() { + ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null + ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null + ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +} + +drush_checks() { + # Make sure there's nothing in the git index before drush install + git diff --cached --quiet + ddev drush st + # Make sure there's nothing after the drush install + git diff --cached --quiet || (echo "git index has been touched" && exit 2) + ddev drush si -y --account-pass=admin +} + +teardown() { + set -eu -o pipefail + cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) + ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 + [ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR} +} + +@test "install from directory" { + set -eu -o pipefail + cd ${TESTDIR} + echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 + ddev get ${DIR} + ddev restart + base_checks + drush_checks +} + +#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support +#@test "install from release" { +# set -eu -o pipefail +# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) +# echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 +# ddev get justafish/ddev-drupal-core-dev +# ddev restart >/dev/null +# health_checks +#} +