docker-minecraft-server/tests/test.sh

23 lines
244 B
Bash
Raw Normal View History

#!/bin/bash
2021-12-05 00:42:03 +00:00
cd "$(dirname "$0")" || exit 1
failed=false
2021-12-05 00:42:03 +00:00
down() {
docker-compose down -v
}
docker-compose run monitor || failed=true
echo "
Result: failed=$failed"
if $failed; then
2021-12-05 00:42:03 +00:00
docker-compose logs mc
down
exit 1
2021-12-05 00:42:03 +00:00
else
down
fi