From 1ba766d277fc35435ca80b9fcfa28c57468f7bce Mon Sep 17 00:00:00 2001 From: TheMightyV Date: Wed, 5 Jan 2022 19:58:46 +0100 Subject: tests always verbose tests block spacing tests show list of backups fixed bad variable in bup_ls_all --- backends/bup.sh | 2 +- tests.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/backends/bup.sh b/backends/bup.sh index cae36fe..d1250de 100644 --- a/backends/bup.sh +++ b/backends/bup.sh @@ -66,7 +66,7 @@ function bup_ls_dir() { function bup_ls_all() { for backup_dir in ${BACKUP_DIRS[*]} do - echo "bup: backups in \"$BACKUP_DIR\":" + echo "bup: backups in \"$backup_dir\":" bup -d "$(bup_local)" ls -r "$backup_dir" --human-readable -l "$BACKUP_NAME" done } diff --git a/tests.sh b/tests.sh index b12a32a..fc6a692 100755 --- a/tests.sh +++ b/tests.sh @@ -5,6 +5,8 @@ source server.sh +VERBOSE=1 + WORLD_NAME="test_world" function test_backend() { @@ -53,6 +55,8 @@ function test_backend() { exit fi + ls_backups + # corrupting current (new) world find "$DIR/$WORLD_NAME" -type f -exec shred {} \; @@ -102,13 +106,13 @@ function test_backend() { cleanup } -echo "Testing tar backend" +printf "\n\n\nTesting tar backend\n" test_backend "tar" -echo "Testing bup backend" +printf "\n\n\nTesting bup backend\n" test_backend "bup" -echo "Testing borg backend" +printf "\n\n\nTesting borg backend\n" test_backend "borg" -echo "All tests passed" +printf "\n\n\nAll tests passed\n" -- cgit v1.2.3