mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-11 20:15:36 +02:00
Add test case for ownership
This commit is contained in:
@@ -19,6 +19,13 @@ docker run --rm -it \
|
||||
echo "[TEST:PASS] Found relevant files in untared remote backup."
|
||||
|
||||
test -L ./local/test.latest.tar.gz.gpg
|
||||
|
||||
owner=$(stat -c '%U:%G' ./local/test.tar.gz.gpg)
|
||||
if [ "$owner" != "1000:1000" ]; then
|
||||
echo "[TEST:FAIL] Expected backup file to have correct owners, got $owner"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1234secret | gpg -d --yes --passphrase-fd 0 ./local/test.tar.gz.gpg > ./local/decrypted.tar.gz
|
||||
tar -xf ./local/decrypted.tar.gz -C /tmp && test -f /tmp/backup/app_data/offen.db
|
||||
rm ./local/decrypted.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user