diff --git a/test/azure/run.sh b/test/azure/run.sh index f645535..80e5875 100644 --- a/test/azure/run.sh +++ b/test/azure/run.sh @@ -27,7 +27,7 @@ pass "Found relevant files in untared remote backups." # The second part of this test checks if backups get deleted when the retention # is set to 0 days (which it should not as it would mean all backups get deleted) -BACKUP_RETENTION_DAYS="0" docker compose up -d +BACKUP_RETENTION_DAYS="0" docker compose up -d --timeout 3 sleep 5 docker compose exec backup backup @@ -40,7 +40,7 @@ pass "Remote backups have not been deleted." # The third part of this test checks if old backups get deleted when the retention # is set to 7 days (which it should) -BACKUP_RETENTION_DAYS="7" docker compose up -d +BACKUP_RETENTION_DAYS="7" docker compose up -d --timeout 3 sleep 5 info "Create first backup with no prune" @@ -63,4 +63,4 @@ test -f ./local/test.tar.gz pass "Old remote backup has been pruned, new one is still present." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/certs/run.sh b/test/certs/run.sh index 9f5e2d0..9cbb33a 100644 --- a/test/certs/run.sh +++ b/test/certs/run.sh @@ -40,4 +40,4 @@ docker run --rm \ pass "Found relevant files in untared remote backups." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/commands/run.sh b/test/commands/run.sh index 15006ae..787ee9f 100644 --- a/test/commands/run.sh +++ b/test/commands/run.sh @@ -29,7 +29,7 @@ if [ -f ./backup/data/post.txt ]; then fi pass "Did not find unexpected file." -docker compose down --volumes +docker compose down --volumes --timeout 3 sudo rm -rf ./local diff --git a/test/confd/run.sh b/test/confd/run.sh index 3db626d..a8994c2 100755 --- a/test/confd/run.sh +++ b/test/confd/run.sh @@ -13,7 +13,7 @@ docker compose up -d --quiet-pull # sleep until a backup is guaranteed to have happened on the 1 minute schedule sleep 100 -docker compose down --volumes +docker compose down --volumes --timeout 3 if [ ! -f ./local/conf.tar.gz ]; then fail "Config from file was not used." diff --git a/test/dropbox/run.sh b/test/dropbox/run.sh index de208e8..427b27e 100644 --- a/test/dropbox/run.sh +++ b/test/dropbox/run.sh @@ -28,7 +28,7 @@ fi # The second part of this test checks if backups get deleted when the retention # is set to 0 days (which it should not as it would mean all backups get deleted) -BACKUP_RETENTION_DAYS="0" docker compose up -d +BACKUP_RETENTION_DAYS="0" docker compose up -d --timeout 3 sleep 5 logs=$(docker compose exec -T backup backup) @@ -43,7 +43,7 @@ fi # The third part of this test checks if old backups get deleted when the retention # is set to 7 days (which it should) -BACKUP_RETENTION_DAYS="7" docker compose up -d +BACKUP_RETENTION_DAYS="7" docker compose up -d --timeout 3 sleep 5 info "Create second backup and prune" @@ -61,5 +61,5 @@ else fi -docker compose down --volumes +docker compose down --volumes --timeout 3 rm user_v2_ready.yaml diff --git a/test/extend/run.sh b/test/extend/run.sh index 9794630..370661b 100644 --- a/test/extend/run.sh +++ b/test/extend/run.sh @@ -26,4 +26,4 @@ if [ ! -f "./local/app_data/offen.db" ]; then fail "Could not find expected file in untared archive." fi -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/gpg/run.sh b/test/gpg/run.sh index c4d0d7b..135ee5a 100755 --- a/test/gpg/run.sh +++ b/test/gpg/run.sh @@ -30,4 +30,4 @@ if [ ! -L ./local/test-latest.tar.gz.gpg ]; then fail "Could not find local symlink to latest encrypted backup." fi -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/ignore/run.sh b/test/ignore/run.sh index e36e145..99e30ef 100644 --- a/test/ignore/run.sh +++ b/test/ignore/run.sh @@ -12,7 +12,7 @@ docker compose up -d --quiet-pull sleep 5 docker compose exec backup backup -docker compose down --volumes +docker compose down --volumes --timeout 3 out=$(mktemp -d) sudo tar --same-owner -xvf ./local/test.tar.gz -C "$out" diff --git a/test/local/run.sh b/test/local/run.sh index c55bff6..bdf17c2 100755 --- a/test/local/run.sh +++ b/test/local/run.sh @@ -41,7 +41,7 @@ pass "Found symlink to latest version in local backup." # The second part of this test checks if backups get deleted when the retention # is set to 0 days (which it should not as it would mean all backups get deleted) -BACKUP_RETENTION_DAYS="0" docker compose up -d +BACKUP_RETENTION_DAYS="0" docker compose up -d --timeout 3 sleep 5 docker compose exec backup backup @@ -54,7 +54,7 @@ pass "Local backups have not been deleted." # The third part of this test checks if old backups get deleted when the retention # is set to 7 days (which it should) -BACKUP_RETENTION_DAYS="7" docker compose up -d +BACKUP_RETENTION_DAYS="7" docker compose up -d --timeout 3 sleep 5 info "Create first backup with no prune" @@ -70,4 +70,4 @@ test -f ./local/test-hostnametoken.tar.gz pass "Old remote backup has been pruned, new one is still present." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/notifications/run.sh b/test/notifications/run.sh index 9142ff2..ba07f78 100755 --- a/test/notifications/run.sh +++ b/test/notifications/run.sh @@ -22,9 +22,9 @@ if [ "$NUM_MESSAGES" != 0 ]; then fi pass "No notifications were sent when not configured." -docker compose down +docker compose down --timeout 3 -NOTIFICATION_URLS="gotify://gotify/${GOTIFY_TOKEN}?disableTLS=true" docker compose up -d +NOTIFICATION_URLS="gotify://gotify/${GOTIFY_TOKEN}?disableTLS=true" docker compose up -d --timeout 3 docker compose exec backup backup @@ -47,4 +47,4 @@ if [ "$MESSAGE_BODY" != "Backing up /tmp/test.tar.gz succeeded." ]; then fi pass "Custom notification body was used." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/ownership/run.sh b/test/ownership/run.sh index 7582cde..5c8d5ed 100644 --- a/test/ownership/run.sh +++ b/test/ownership/run.sh @@ -27,4 +27,4 @@ for file in $(sudo find $tmp_dir/backup/postgres); do done pass "All files and directories in backup preserved their ownership." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/pruning/run.sh b/test/pruning/run.sh index 2909fd3..409b0c7 100644 --- a/test/pruning/run.sh +++ b/test/pruning/run.sh @@ -29,7 +29,7 @@ docker run --rm \ # Skip s3 backend from prune -docker compose up -d +docker compose up -d --timeout 3 sleep 5 info "Create backup with no prune for s3 backend" @@ -50,7 +50,7 @@ pass "Old remote backup has been pruned locally, skipped S3 backend is untouched touch -r ./local/test-hostnametoken.tar.gz -d "14 days ago" ./local/test-hostnametoken-old.tar.gz -docker compose up -d +docker compose up -d --timeout 3 sleep 5 info "Create backup with no prune for both backends" @@ -67,4 +67,4 @@ docker run --rm \ pass "Skipped all backends while pruning." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/s3/run.sh b/test/s3/run.sh index cc93818..1e5b6fd 100644 --- a/test/s3/run.sh +++ b/test/s3/run.sh @@ -24,7 +24,7 @@ pass "Found relevant files in untared remote backups." # The second part of this test checks if backups get deleted when the retention # is set to 0 days (which it should not as it would mean all backups get deleted) -BACKUP_RETENTION_DAYS="0" docker compose up -d +BACKUP_RETENTION_DAYS="0" docker compose up -d --timeout 3 sleep 5 docker compose exec backup backup @@ -39,7 +39,7 @@ pass "Remote backups have not been deleted." # The third part of this test checks if old backups get deleted when the retention # is set to 7 days (which it should) -BACKUP_RETENTION_DAYS="7" docker compose up -d +BACKUP_RETENTION_DAYS="7" docker compose up -d --timeout 3 sleep 5 info "Create first backup with no prune" @@ -60,4 +60,4 @@ docker run --rm \ pass "Old remote backup has been pruned, new one is still present." -docker compose down --volumes +docker compose down --volumes --timeout 3 diff --git a/test/user/run.sh b/test/user/run.sh index 75be98d..f01c29b 100644 --- a/test/user/run.sh +++ b/test/user/run.sh @@ -25,6 +25,6 @@ if [ "$(cat ./backup/data/whoami.txt)" != "$user_name" ]; then fi pass "Found expected user." -docker compose down --volumes +docker compose down --volumes --timeout 3 sudo rm -rf ./local diff --git a/test/webdav/run.sh b/test/webdav/run.sh index 579e354..c1ca4b6 100644 --- a/test/webdav/run.sh +++ b/test/webdav/run.sh @@ -24,7 +24,7 @@ pass "Found relevant files in untared remote backup." # The second part of this test checks if backups get deleted when the retention # is set to 0 days (which it should not as it would mean all backups get deleted) -BACKUP_RETENTION_DAYS="0" docker compose up -d +BACKUP_RETENTION_DAYS="0" docker compose up -d --timeout 3 sleep 5 docker compose exec backup backup @@ -39,7 +39,7 @@ pass "Remote backups have not been deleted." # The third part of this test checks if old backups get deleted when the retention # is set to 7 days (which it should) -BACKUP_RETENTION_DAYS="7" docker compose up -d +BACKUP_RETENTION_DAYS="7" docker compose up -d --timeout 3 sleep 5 info "Create first backup with no prune" @@ -62,4 +62,4 @@ docker run --rm \ pass "Old remote backup has been pruned, new one is still present." -docker compose down --volumes +docker compose down --volumes --timeout 3