docker-duplicity-cron/itest.sh
ViViDboarder efb7d3e5ab Add test for existance of cron and crontab
This was missing in x86 builds and we don't have a test verifying the
crontabs themselves, so it was never caught. It would be better to
verify those, but that would mean async testing which could result in
very slow builds or other issues.

Fixes #5
2018-01-29 12:30:43 -08:00

33 lines
538 B
Bash
Executable File

#! /bin/bash
set -e
echo "Performing backup tests"
echo "Verify cron and crontab exist"
type cron
type crontab
echo "Create test data..."
mkdir -p /data && echo Test > /data/test.txt
echo "Making backup..."
/backup.sh
echo "Verify backup..."
/verify.sh
echo "Delete test data..."
rm -fr /data/*
echo "Restore backup..."
/restore.sh
echo "Verify backup..."
/verify.sh
echo "Verify incorrect passphrase fails..."
export PASSPHRASE=Incorrect.Mule.Solar.Paperclip
echo "Fail to restore backup..."
/restore.sh && exit 1 || echo "OK"