]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
add test backup count info
authorBastian Dehn <hhaalo@arcor.de>
Tue, 4 Aug 2026 14:07:58 +0000 (16:07 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 4 Aug 2026 14:07:58 +0000 (16:07 +0200)
src/backup
tests/backup_tests.bats

index 7fd8036449603eae60313e7c33e56c5c31f14467..54afc8101d09840b7a88121256cb12f975830711 100755 (executable)
@@ -58,6 +58,7 @@ main()
        [ "$backup_count" != "null" ] \
                || errlog "$CONFIG_FILE missing backup_count" \
                || return $?
+       echo "ℹ️ INFO: backup count $backup_count"
 }
 
 [ "$TESTMODE" == "ON" ] && return 0
index a39a213edc1d0cd872656d9fa416603838a8d721..467e57d6c7be34650344f8ad99fa37016f365047 100755 (executable)
@@ -26,7 +26,7 @@ teardown() {
        run main
 
        assert_success
-       assert_output "⭐ START: backup"
+       assert_line --index 0 "⭐ START: backup"
 }
 
 @test "failure yq command not found" {
@@ -134,4 +134,11 @@ teardown() {
 
        assert_line --index 0 "⭐ START: backup"
        assert_line --index 1 "❌ ERROR: src/config-example.yaml missing backup_count"
+}
+
+@test "success info backup count" {
+       run main
+
+       assert_line --index 0 "⭐ START: backup"
+       assert_line --index 1 "ℹ️ INFO: backup count 15"
 }
\ No newline at end of file