Skip to content

Commit 3fac991

Browse files
committed
Fix merge conflict
1 parent 96e8fa1 commit 3fac991

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

core-dev/gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
/sites/simpletest
77
/sites/default/files
88
/vendor
9-
test_output
9+
test_output
10+
*.orig

tests/test.bats

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,38 @@ setup() {
22
set -eu -o pipefail
33
export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
44
export TESTDIR=~/tmp/test-ddev-drupal-core-dev
5-
mkdir -p $TESTDIR
6-
export PROJNAME=ddev-drupal-core-dev
5+
rm -rf ${TESTDIR}
6+
mkdir -p ${TESTDIR}
7+
export PROJNAME=test-ddev-drupal-core-dev
78
export DDEV_NON_INTERACTIVE=true
89
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true
910
curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz
1011
tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR}
1112
cd "${TESTDIR}"
13+
mv vendor /tmp/vendor.bak
14+
git init && git add . >/dev/null && git commit -m "current" >/dev/null
15+
mv /tmp/vendor.bak vendor
1216
ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp
1317
ddev config --update
1418
ddev start -y >/dev/null
19+
ddev composer install >/dev/null
1520
}
1621

17-
health_checks() {
18-
ddev exec "curl -s chrome:7900" | grep "noVNC"
19-
ddev exec "curl -s firefox:7901" | grep "noVNC"
22+
base_checks() {
23+
ddev exec "curl -s chrome:7900" | grep "noVNC" >/dev/null
24+
ddev exec "curl -s firefox:7901" | grep "noVNC" >/dev/null
2025
ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
2126
}
2227

28+
drush_checks() {
29+
# Make sure there's nothing in the git index before drush install
30+
git diff --cached --quiet
31+
ddev drush st
32+
# Make sure there's nothing after the drush install
33+
git diff --cached --quiet || (echo "git index has been touched" && exit 2)
34+
ddev drush si -y --account-pass=admin
35+
}
36+
2337
teardown() {
2438
set -eu -o pipefail
2539
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
@@ -33,7 +47,8 @@ teardown() {
3347
echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
3448
ddev get ${DIR}
3549
ddev restart
36-
health_checks
50+
base_checks
51+
drush_checks
3752
}
3853

3954
#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support

0 commit comments

Comments
 (0)