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 4, 2024
1 parent 422b7cc commit 4c0b172
Showing 1 changed file with 5 additions and 1 deletion.
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 4c0b172

Please sign in to comment.