2022-05-08 11:20:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
2022-06-23 14:40:29 +02:00
|
|
|
. ../util.sh
|
|
|
|
current_test=$(basename $(pwd))
|
|
|
|
|
2022-05-08 11:20:38 +02:00
|
|
|
mkdir -p local
|
|
|
|
|
|
|
|
docker-compose up -d
|
|
|
|
sleep 5
|
|
|
|
docker-compose exec backup backup
|
|
|
|
|
|
|
|
docker-compose down --volumes
|
|
|
|
|
|
|
|
out=$(mktemp -d)
|
|
|
|
sudo tar --same-owner -xvf ./local/test.tar.gz -C "$out"
|
|
|
|
|
|
|
|
if [ ! -f "$out/backup/data/me.txt" ]; then
|
2022-06-23 14:40:29 +02:00
|
|
|
fail "Expected file was not found."
|
2022-05-08 11:20:38 +02:00
|
|
|
fi
|
2022-06-23 14:40:29 +02:00
|
|
|
pass "Expected file was found."
|
2022-05-08 11:20:38 +02:00
|
|
|
|
|
|
|
if [ -f "$out/backup/data/skip.me" ]; then
|
2022-06-23 14:40:29 +02:00
|
|
|
fail "Ignored file was found."
|
2022-05-08 11:20:38 +02:00
|
|
|
fi
|
2022-06-23 14:40:29 +02:00
|
|
|
pass "Ignored file was not found."
|