Skip to content

Commit 90582df

Browse files
authored
Merge pull request #25 from rfay/20240428_tests
fix: Make tests run successfully
2 parents 9b52716 + 5a93398 commit 90582df

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
runs-on: ubuntu-latest
3030

3131
steps:
32-
- name: Setup SSH
33-
run: ssh-keyscan -t rsa git.drupal.org >> ~/.ssh/known_hosts
34-
3532
- uses: ddev/github-action-add-on-test@v2
3633
with:
3734
ddev_version: ${{ matrix.ddev_version }}

tests/test.bats

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ setup() {
66
export PROJNAME=ddev-drupal-core-dev
77
export DDEV_NON_INTERACTIVE=true
88
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true
9-
git clone git@git.drupal.org:project/drupal.git ${TESTDIR}
9+
curl -L -o /tmp/drupal.tar.gz https://ftp.drupal.org/files/projects/drupal-11.x-dev.tar.gz
10+
tar --strip-components 1 -zxf /tmp/drupal.tar.gz -C ${TESTDIR}
1011
cd "${TESTDIR}"
11-
ddev config --project-name=${PROJNAME}
12+
ddev config --project-name=${PROJNAME} --upload-dirs=.ddev/tmp
13+
ddev config --update
1214
ddev start -y >/dev/null
1315
}
1416

1517
health_checks() {
1618
ddev exec "curl -s chrome:7900" | grep "noVNC"
1719
ddev exec "curl -s firefox:7901" | grep "noVNC"
20+
ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
1821
}
1922

2023
teardown() {
@@ -33,12 +36,13 @@ teardown() {
3336
health_checks
3437
}
3538

36-
@test "install from release" {
37-
set -eu -o pipefail
38-
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
39-
echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
40-
ddev get justafish/ddev-drupal-core-dev
41-
ddev restart >/dev/null
42-
health_checks
43-
}
39+
#TODO: Re-enable release tests after the add-on has a release with DDEV v1.23.0 support
40+
#@test "install from release" {
41+
# set -eu -o pipefail
42+
# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
43+
# echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
44+
# ddev get justafish/ddev-drupal-core-dev
45+
# ddev restart >/dev/null
46+
# health_checks
47+
#}
4448

web-build/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,15 @@
33
RUN sudo apt-get update && sudo apt-get install chromium-driver -y
44
# This will not be necessary in DDEV v1.23+
55
RUN corepack enable
6+
7+
# TODO:
8+
# This section is temporary and needs to be removed when
9+
# https://github.com/justafish/ddev-drupal-core-dev/pull/23/files#top
10+
# is pulled, because it includes this update.
11+
ARG TARGETPLATFORM
12+
RUN SQLITE_VERSION=3.45.1 && \
13+
mkdir -p /tmp/sqlite3 && \
14+
wget -O /tmp/sqlite3/sqlite3.deb https://ftp.debian.org/debian/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETPLATFORM##linux/}.deb && \
15+
wget -O /tmp/sqlite3/libsqlite3.deb https://ftp.debian.org/debian/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETPLATFORM##linux/}.deb && \
16+
dpkg -i /tmp/sqlite3/*.deb && \
17+
rm -rf /tmp/sqlite3

0 commit comments

Comments
 (0)