mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-23 05:30:33 +01:00
ad4e2af83f
* Skip backends while pruning * Add pruning test step and silence download log for better readability * Add test cases for pruning in all backends Also add -q or --quiet-pull to all tests. * Add test case for skipping backends while pruning * Adjusted test logging, generate new test spec file * Gitignore for temp test file
31 lines
615 B
Bash
31 lines
615 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
cd $(dirname $0)
|
|
. ../util.sh
|
|
current_test=$(basename $(pwd))
|
|
|
|
docker compose up -d --quiet-pull
|
|
|
|
user_name=testuser
|
|
docker exec user-alpine-1 adduser --disabled-password "$user_name"
|
|
|
|
docker compose exec backup backup
|
|
|
|
tar -xvf ./local/test.tar.gz
|
|
if [ ! -f ./backup/data/whoami.txt ]; then
|
|
fail "Could not find file written by pre command."
|
|
fi
|
|
pass "Found expected file."
|
|
|
|
tar -xvf ./local/test.tar.gz
|
|
if [ "$(cat ./backup/data/whoami.txt)" != "$user_name" ]; then
|
|
fail "Could not find expected user name."
|
|
fi
|
|
pass "Found expected user."
|
|
|
|
docker compose down --volumes
|
|
sudo rm -rf ./local
|
|
|