add test for interacting with a swarm stack

This commit is contained in:
Frederik Ring
2021-07-11 09:43:16 +02:00
parent dda71c3a5d
commit a91353742d
4 changed files with 112 additions and 4 deletions

View File

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