mirror of
https://github.com/ViViDboarder/docker-duplicity-cron.git
synced 2024-11-23 10:46:29 +00:00
Update test to be more testy
This commit is contained in:
parent
947dc939f2
commit
9671c1461d
@ -1,4 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
image=$1
|
image=$1
|
||||||
|
|
||||||
@ -35,6 +36,10 @@ else
|
|||||||
echo "Restore backup..."
|
echo "Restore backup..."
|
||||||
/restore.sh
|
/restore.sh
|
||||||
|
|
||||||
|
echo "Verify restore..."
|
||||||
|
test -f /data/test.txt
|
||||||
|
cat /data/test.txt
|
||||||
|
|
||||||
echo "Verify backup..."
|
echo "Verify backup..."
|
||||||
/verify.sh
|
/verify.sh
|
||||||
|
|
||||||
@ -49,10 +54,9 @@ else
|
|||||||
|
|
||||||
echo "Verify restore happened..."
|
echo "Verify restore happened..."
|
||||||
test -f /data/test.txt
|
test -f /data/test.txt
|
||||||
|
cat /data/test.txt
|
||||||
|
|
||||||
echo "Verify restore with incorrect passphrase fails..."
|
echo "Verify restore with incorrect passphrase fails..."
|
||||||
export PASSPHRASE=Incorrect.Mule.Solar.Paperclip
|
|
||||||
|
|
||||||
echo "Fail to restore backup..."
|
echo "Fail to restore backup..."
|
||||||
/restore.sh && exit 1 || echo "OK"
|
PASSPHRASE=Incorrect.Mule.Solar.Paperclip /restore.sh && exit 1 || echo "OK"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user