mirror of
https://github.com/versity/versitygw.git
synced 2026-05-21 11:21:28 +00:00
test: add fix
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user