mirror of
https://github.com/ViViDboarder/docker-duplicity-cron.git
synced 2024-12-22 15:57:41 +00:00
Print logs if failing tests
This commit is contained in:
parent
fa9c0f9798
commit
f153d3d638
@ -22,10 +22,10 @@ else
|
|||||||
mkdir -p /data && echo Test > /data/test.txt
|
mkdir -p /data && echo Test > /data/test.txt
|
||||||
|
|
||||||
echo "Making backup..."
|
echo "Making backup..."
|
||||||
/cron-exec.sh /backup.sh
|
/cron-exec.sh /backup.sh || { cat /cron.log && exit 1; }
|
||||||
|
|
||||||
echo "Verify backup..."
|
echo "Verify backup..."
|
||||||
/cron-exec.sh /verify.sh
|
/cron-exec.sh /verify.sh || { cat /cron.log && exit 1; }
|
||||||
|
|
||||||
echo "Delete test data..."
|
echo "Delete test data..."
|
||||||
rm -fr /data/*
|
rm -fr /data/*
|
||||||
@ -34,15 +34,15 @@ else
|
|||||||
test -f /data/test.txt && exit 1 || echo "Gone"
|
test -f /data/test.txt && exit 1 || echo "Gone"
|
||||||
|
|
||||||
echo "Restore backup..."
|
echo "Restore backup..."
|
||||||
/cron-exec.sh /restore.sh
|
/cron-exec.sh /restore.sh || { cat /cron.log && exit 1; }
|
||||||
/healthcheck.sh
|
/healthcheck.sh || { cat /cron.log && exit 1; }
|
||||||
|
|
||||||
echo "Verify restore..."
|
echo "Verify restore..."
|
||||||
test -f /data/test.txt
|
test -f /data/test.txt
|
||||||
cat /data/test.txt
|
cat /data/test.txt
|
||||||
|
|
||||||
echo "Verify backup..."
|
echo "Verify backup..."
|
||||||
/verify.sh
|
/cron-exec.sh /verify.sh || { cat /cron.log && exit 1; }
|
||||||
|
|
||||||
echo "Delete test data again..."
|
echo "Delete test data again..."
|
||||||
rm -fr /data/*
|
rm -fr /data/*
|
||||||
@ -51,8 +51,8 @@ else
|
|||||||
test -f /data/test.txt && exit 1 || echo "Gone"
|
test -f /data/test.txt && exit 1 || echo "Gone"
|
||||||
|
|
||||||
echo "Simulate a restart with RESTORE_ON_EMPTY_START..."
|
echo "Simulate a restart with RESTORE_ON_EMPTY_START..."
|
||||||
RESTORE_ON_EMPTY_START=true /start.sh
|
RESTORE_ON_EMPTY_START=true /start.sh || { cat /cron.log && exit 1; }
|
||||||
/healthcheck.sh
|
/healthcheck.sh || { cat /cron.log && exit 1; }
|
||||||
|
|
||||||
echo "Verify restore happened..."
|
echo "Verify restore happened..."
|
||||||
test -f /data/test.txt
|
test -f /data/test.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user