local CONFIG_FILE=${CONFIG_FILE:="config.yaml"}
exists_needed_commands || return $?
echo "⭐ START: backupmount"
+
+ local cmd="$1"
+ [ -n "$md" ] \
+ || errlog "missing command" \
+ || return $?
}
[ "$TESTMODE" == "ON" ] && return 0
exists_needed_commands() {
return 0
}
+
run main
assert_line --index 0 "⭐ START: backupmount"
assert_failure
assert_line --index 0 "❌ ERROR: command cryptsetup not found"
+}
+
+# bats test_tags=backupmount:start
+@test "failure missing command parameter" {
+ exists_needed_commands() {
+ return 0
+ }
+
+ run main
+
+ assert_failure
+ assert_line --index 0 "⭐ START: backupmount"
+ assert_line --index 1 "❌ ERROR: missing command"
}
\ No newline at end of file