test: add fix

This commit is contained in:
Luke McCrone
2026-05-13 11:40:30 -03:00
parent aa3889ef87
commit 4629eab44c
3 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,11 @@ generate_random_string() {
range=$(($2 - $1 + 1))
size=$(($1 + RANDOM % range))
string=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | head -c "$size")
string=$({ LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom || true; } | head -c "$size")
if [ "${#string}" -eq 0 ]; then
log 2 "error generating string"
return 1
fi
echo "$string"
return 0
}

View File

@@ -20,6 +20,7 @@ load ./bats-assert/load
source ./tests/test_user_common.sh
source ./tests/commands/get_object.sh
source ./tests/commands/put_object.sh
source ./tests/drivers/list_buckets/list_buckets.sh
source ./tests/drivers/list_buckets/list_buckets_s3api.sh
source ./tests/drivers/put_bucket_ownership_controls/put_bucket_ownership_controls_rest.sh
source ./tests/drivers/file.sh

View File

@@ -18,6 +18,7 @@ load ./bats-support/load
load ./bats-assert/load
source ./tests/drivers/list_buckets/list_buckets.sh
source ./tests/drivers/list_buckets/list_buckets_s3api.sh
source ./tests/drivers/put_bucket_ownership_controls/put_bucket_ownership_controls_rest.sh
source ./tests/drivers/user.sh
source ./tests/test_user_common.sh