Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/rest chunk upload #1068

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/commands/get_bucket_ownership_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ get_bucket_ownership_controls() {
return 1
fi

raw_bucket_ownership_controls=""
if ! raw_bucket_ownership_controls=$(send_command aws --no-verify-ssl s3api get-bucket-ownership-controls --bucket "$1" 2>&1); then
log 2 "error getting bucket ownership controls: $raw_bucket_ownership_controls"
return 1
Expand Down
4 changes: 1 addition & 3 deletions tests/logger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

# levels: 1 - crit, 2 - err, 3 - warn, 4 - info, 5 - debug, 6 - trace

export LOG_LEVEL_INT=4

log() {
if [[ $# -ne 2 ]]; then
echo "log function requires level, message"
return 1
fi
# shellcheck disable=SC2153
if [[ $1 -gt $LOG_LEVEL_INT ]]; then
if [[ $1 -gt ${LOG_LEVEL_INT:=4} ]]; then
return 0
fi
log_level=""
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/abort_multipart_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X DELETE "$AWS_ENDPOINT_URL/$bucket_name/$key?uploadId=$upload_id"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/complete_multipart_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X POST "$AWS_ENDPOINT_URL/$bucket_name/$key?uploadId=$upload_id"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/copy_object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-copy-source;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name/$key")
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/create_multipart_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ UNSIGNED-PAYLOAD"

canonical_request_hash="$(echo -n "$canonical_request" | openssl dgst -sha256 | awk '{print $2}')"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X POST "$AWS_ENDPOINT_URL/$bucket_name/$key?uploads="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/delete_object_tagging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X DELETE "$AWS_ENDPOINT_URL/$bucket_name/$key?tagging"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/delete_objects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fi
canonical_request+="host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X POST "$AWS_ENDPOINT_URL/$bucket_name?delete")
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_bucket_acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?acl="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_bucket_ownership_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?ownershipControls="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_bucket_policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?policy="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_bucket_tagging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?tagging="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_bucket_versioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?versioning="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name/$key"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_object_attributes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ x-amz-object-attributes:$attributes
host;x-amz-content-sha256;x-amz-date;x-amz-object-attributes
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name/$key?attributes="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_object_legal_hold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name/$key?legal-hold="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/get_public_access_block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name?publicAccessBlock="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/head_object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ksI -w "\"%{http_code}\"" "$AWS_ENDPOINT_URL/$bucket_name/$key"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/list_buckets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "https://$host"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/list_multipart_uploads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "https://$host/$bucket_name/$key?uploads="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/list_object_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "https://$host/$bucket_name?versions"
Expand Down
2 changes: 2 additions & 0 deletions tests/rest_scripts/list_objects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ x-amz-date:$current_date_time

host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"")
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/list_parts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" "https://$host/$bucket_name/$key?uploadId=$upload_id"
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_bucket_acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fi
canonical_request+="x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name?acl=")
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_bucket_ownership_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ x-amz-date:$current_date_time
content-md5;host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name?ownershipControls="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_bucket_policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name?policy="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_bucket_tagging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ x-amz-date:$current_date_time
content-md5;host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name?tagging="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_bucket_versioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ x-amz-date:$current_date_time
host;x-amz-content-sha256;x-amz-date
$payload_hash"

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name?versioning="
Expand Down
1 change: 1 addition & 0 deletions tests/rest_scripts/put_object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ host;x-amz-content-sha256;x-amz-date
$payload_hash"
fi

# shellcheck disable=SC2119
create_canonical_hash_sts_and_signature

curl_command+=(curl -ks -w "\"%{http_code}\"" -X PUT "$AWS_ENDPOINT_URL/$bucket_name/$key")
Expand Down
Loading
Loading