test: send the location constraint when creating buckets outside us-east-1
This commit is contained in:
1 parent
5207fe5e36
commit
9abdd46f7b
2 files changed
+14
-3
No files matched your search
@@ -67,6 +67,9 @@ create_canonical_hash_sts_and_signature
|
||||
curl_command+=(curl -ks -w "%{http_code}" -X PUT "$AWS_ENDPOINT_URL/$bucket_name")
|
||||
curl_command+=(-H "\"Authorization: AWS4-HMAC-SHA256 Credential=$aws_access_key_id/$year_month_day/$aws_region/s3/aws4_request,SignedHeaders=$param_list,Signature=$signature\"")
|
||||
curl_command+=("${header_fields[@]}")
|
||||
if [ "$aws_region" != "us-east-1" ]; then
|
||||
curl_command+=(-d "\"<CreateBucketConfiguration><LocationConstraint>$aws_region</LocationConstraint></CreateBucketConfiguration>\"")
|
||||
fi
|
||||
curl_command+=(-o "$OUTPUT_FILE")
|
||||
# shellcheck disable=SC2154
|
||||
eval "${curl_command[*]}" 2>&1
|
||||
Reference in new issue
Block a user