assert that all containers are back up and running after backup

This commit is contained in:
Frederik Ring 2021-07-09 09:57:05 +02:00
parent 88d4326e61
commit 44d65c1a67

View File

@ -13,6 +13,12 @@ docker run --rm -it \
-v default_backup_data:/data alpine \ -v default_backup_data:/data alpine \
ash -c 'tar -xf /data/backup/test.tar.gz && test -f /backup/app_data/offen.db' ash -c 'tar -xf /data/backup/test.tar.gz && test -f /backup/app_data/offen.db'
if [ "$(docker-compose ps -q | wc -l)" != "3" ]; then
echo "Expected all containers to be running post backup, instead seen:"
docker-compose ps
exit 1
fi
docker-compose down --volumes docker-compose down --volumes
echo "Test passed" echo "Test passed"