]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add log entry for created backup
authorBastian Dehn <hhaalo@arcor.de>
Sun, 9 Aug 2026 09:32:16 +0000 (11:32 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 9 Aug 2026 09:32:16 +0000 (11:32 +0200)
src/backup
tests/backup_tests.bats

index 259d37687520e5d97bf57497169cfa1d4270a9cb..d69bd443fabc4c67fb22cb162947a752cf32c72b 100755 (executable)
@@ -281,6 +281,8 @@ backup_machines()
                        "$last_backup_dir_path" \
                        || return $?
        done
+
+       log "$config" "created $backup_dir"
 }
 
 get_backup_count()
index fdd3f1cb4aecdca8861e3559c179fa26b70ed223..ac6eb494a44f468c41534828dc95d936f596c9c2 100755 (executable)
@@ -397,9 +397,10 @@ teardown() {
        assert_line --index 7 "ℹ️ INFO: create directory build/test/2000-01-01_01_backup/testpc1"
        assert_line --index 8 "ℹ️ INFO: create directory build/test/2000-01-01_01_backup/testpc2"
        assert_line --index 9 "ℹ️ INFO: create directory build/test/2000-01-01_01_backup/onlylocal"
-       assert_line --index 10 "ℹ️ INFO: backup count: 1"
-       assert_line --index 11 "🏁 FINISH: backup run"
-       assert_line --index 12 "✅ SUCCESS: backup"
+       assert_line --index 10 "ℹ️ INFO: 2000-01-01 [none] created 2000-01-01_01_backup -> build/test/backup.log"
+       assert_line --index 11 "ℹ️ INFO: backup count: 1"
+       assert_line --index 12 "🏁 FINISH: backup run"
+       assert_line --index 13 "✅ SUCCESS: backup"
        [ -d "build/test/2000-01-01_01_backup" ]
        [ -d "build/test/2000-01-01_01_backup/testpc1" ]
        [ -d "build/test/2000-01-01_01_backup/testpc2" ]
@@ -438,9 +439,10 @@ teardown() {
        assert_line --index 19 "################################################################################"
        assert_line --index 20 "ℹ️ INFO: machine ${LIGHTPURPLE}onlylocal${RESET}; path ${YELLOW}/home/local${RESET}"
        assert_line --index 21 "################################################################################"
-       assert_line --index 22 "ℹ️ INFO: backup count: 1"
-       assert_line --index 23 "🏁 FINISH: backup run"
-       assert_line --index 24 "✅ SUCCESS: backup"
+       assert_line --index 22 "ℹ️ INFO: 2000-01-01 [none] created 2000-01-01_01_backup -> build/test/backup.log"
+       assert_line --index 23 "ℹ️ INFO: backup count: 1"
+       assert_line --index 24 "🏁 FINISH: backup run"
+       assert_line --index 25 "✅ SUCCESS: backup"
 }
 
 # bats test_tags=backup:info