Skip to content

Commit

Permalink
Allow to specify a different IMAP server container image
Browse files Browse the repository at this point in the history
To use another image, e.g. to test a different server implementation, or
because the default image doesn't run on your platform, create a file
called 'tests/MessageRendering/.env' and assign the variable
ROUNDCUBE_TEST_IMAP_SERVER_IMAGE in it.
  • Loading branch information
pabzm committed Jun 14, 2024
1 parent e533e1d commit 63c90ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ skins/elastic/styles/_variables.less
.vscode
.DS_Store
.idea

# Ignore files used for local overriding.
/tests/MessageRendering/.env
6 changes: 5 additions & 1 deletion tests/MessageRendering/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
testsdir=$(realpath $(dirname $0))
cont_name="roundcubetest-dovecot"

ROUNDCUBE_TEST_IMAP_SERVER_IMAGE="docker.io/dovecot/dovecot:latest"

test -f "$testsdir/.env" && source "$testsdir/.env"

docker run -it --rm -d --name "$cont_name" \
-p 143:143 \
-v "$testsdir/data/maildir:/srv/mail/test" \
-v "$testsdir/dovecot-maildir.conf:/etc/dovecot/conf.d/dovecot-maildir.conf" \
docker.io/dovecot/dovecot:latest >/dev/null || exit 1
"$ROUNDCUBE_TEST_IMAP_SERVER_IMAGE" >/dev/null || exit 1

"$testsdir/../../vendor/bin/phpunit" -c "$testsdir/phpunit.xml" --fail-on-warning --fail-on-risky

Expand Down

0 comments on commit 63c90ef

Please sign in to comment.