test: check_param_count

This commit is contained in:
Luke McCrone
2025-06-19 15:31:22 -03:00
parent 23007f4198
commit b99d7e29ae
2 changed files with 2 additions and 4 deletions

View File

@@ -47,8 +47,7 @@ delete_object() {
# shellcheck disable=SC2317
delete_object_rest() {
if [ $# -ne 2 ]; then
log 2 "'delete_object_rest' requires bucket name, object name"
if ! check_param_count "delete_object_rest" "bucket, key" 2 $#; then
return 1
fi
if ! result=$(COMMAND_LOG="$COMMAND_LOG" BUCKET_NAME="$1" OBJECT_KEY="$2" OUTPUT_FILE="$TEST_FILE_FOLDER/result.txt" ./tests/rest_scripts/delete_object.sh 2>&1); then

View File

@@ -40,8 +40,7 @@ log() {
}
log_with_stack_ref() {
if [[ $# -ne 3 ]]; then
echo "log_with_stack_ref function requires level, message, stack reference"
if ! check_log_params "log_with_stack_ref" "level, string, stack reference" 3 $#; then
return 1
fi
# shellcheck disable=SC2153