mirror of
https://github.com/roundcube/roundcubemail-docker.git
synced 2026-02-18 12:51:44 +01:00
It needs different testing than the main images, thus we use standalone workflows. This also makes the main workflows ignore changes in development/ and nightly/
20 lines
557 B
Bash
Executable File
20 lines
557 B
Bash
Executable File
#!/usr/bin/env bash
|
||
|
||
EXPECTED_STRING='Error: No source code in /var/www/html – you must mount your code base to that path!'
|
||
|
||
ContID="$(docker run -d roundcube/roundcubemail:development)"
|
||
sleep 5
|
||
|
||
if $(docker logs $ContID 2>&1 | grep -q "$EXPECTED_STRING"); then
|
||
docker rm -f $ContID 2>&1 >/dev/null
|
||
echo "✅ Test successful "
|
||
exit 0
|
||
fi
|
||
|
||
echo "⚠️ Error: The container output did not contain the expected string '$EXPECTED_STRING', the test failed!"
|
||
echo "Container output:"
|
||
docker logs $ContID
|
||
|
||
docker rm -f $ContID 2>&1 >/dev/null
|
||
exit 1
|