From: Bastian Dehn Date: Sun, 16 Aug 2026 15:14:36 +0000 (+0200) Subject: add info for meida found X-Git-Tag: v1.0.7^2~1^2~17 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=d54cbba75acbe5581d5a42e7b73ce48561bb3beb;p=simple-backup.git add info for meida found --- diff --git a/src/backupmount b/src/backupmount index a1d0ba5..0ad4b65 100755 --- a/src/backupmount +++ b/src/backupmount @@ -64,6 +64,7 @@ mount_device() || errlog "missing device for media $media in $CONFIG_FILE" \ || return $? exists_block_device "$media" "$device" || return $? + echo "ℹ️ INFO: media $media with device $device found" key=$(echo "$config" \ | jq --raw-output ".media.\"$media\".key") diff --git a/tests/backupmount_tests.bats b/tests/backupmount_tests.bats index 2fc3524..6e7aced 100755 --- a/tests/backupmount_tests.bats +++ b/tests/backupmount_tests.bats @@ -164,7 +164,8 @@ teardown() { assert_failure assert_line --index 0 "⭐ START: backupmount" - assert_line --index 1 "❌ ERROR: missing key for media day in src/config-example.yaml" + assert_line --index 1 "ℹ️ INFO: media day with device /dev/path/to/day found" + assert_line --index 2 "❌ ERROR: missing key for media day in src/config-example.yaml" } # bats test_tags=backupmount:mount @@ -187,5 +188,6 @@ teardown() { assert_failure assert_line --index 0 "⭐ START: backupmount" - assert_line --index 1 "❌ ERROR: key notexistskey for media day not exists" + assert_line --index 1 "ℹ️ INFO: media day with device /dev/path/to/day found" + assert_line --index 2 "❌ ERROR: key notexistskey for media day not exists" } \ No newline at end of file