test: add skips check YML, remove old skips, add new issues

This commit is contained in:
Luke McCrone
2025-12-17 11:49:56 -03:00
parent b15e03d154
commit 5d8d054fdc
18 changed files with 224 additions and 200 deletions

84
.github/workflows/skips.yml vendored Normal file
View File

@@ -0,0 +1,84 @@
name: skips check
permissions: {}
on: workflow_dispatch
jobs:
skip-ticket-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Fail if any skip descriptions are empty or point to closed issues/PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
# Find uncommented lines with "skip " (ignore lines whose first non-space char is #)
mapfile -t MATCHES < <(
git ls-files 'tests/test_*.sh' \
| xargs -r grep -nE '^[[:space:]]*[^#][[:space:]]*skip[[:space:]]*$' \
|| true
)
if [ ${#MATCHES[@]} -ne 0 ]; then
echo "${#MATCHES[@]} skip(s) lack a description"
printf ' - %s\n' "${MATCHES[@]}"
exit 1
fi
mapfile -t MATCHES < <(
git ls-files 'tests/test_*.sh' \
| xargs -r grep -nE '^[[:space:]]*[^#][[:space:]]*skip[[:space:]]*"https://github.com' \
|| true
)
urls=()
for m in "${MATCHES[@]}"; do
# Extract first GitHub issue/PR URL on the line:
# supports /issues/123 and /pull/123 (with or without extra suffix)
url="$(echo "$m" | grep -oE 'https://github\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+/(issues|pull)/[0-9]+' | head -n1 || true)"
if [ -n "$url" ]; then
urls+=("$url")
fi
done
if [ ${#urls[@]} -eq 0 ]; then
echo "Found skip lines, but no recognizable GitHub issue/PR URLs."
exit 0
fi
echo "Found skip ticket URLs:"
printf ' - %s\n' "${urls[@]}"
closed=()
for url in "${urls[@]}"; do
# Parse owner/repo and number from URL
# url format: https://github.com/OWNER/REPO/issues/123 or /pull/123
path="${url#https://github.com/}"
owner="$(echo "$path" | cut -d/ -f1)"
repo="$(echo "$path" | cut -d/ -f2)"
num="$(echo "$path" | cut -d/ -f4)"
# Issues API works for both issues and PRs; state=open/closed
state="$(curl -fsSL \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$owner/$repo/issues/$num" \
| python -c "import sys,json; print(json.load(sys.stdin).get('state',''))")"
echo "$url -> $state"
if [ "$state" = "closed" ]; then
closed+=("$url")
fi
done
if [ ${#closed[@]} -gt 0 ]; then
echo "::error::Closed tickets referenced by uncommented skip URLs:"
printf '::error:: - %s\n' "${closed[@]}"
exit 1
fi
echo "All referenced tickets are open. ✅"

View File

@@ -76,12 +76,10 @@ calculate_composite_checksum() {
fi
log 5 "checksums: ${*:2}"
for checksum in ${@:2}; do
if ! binary_checksum=$(echo -n "$checksum" | base64 -d 2>&1); then
log 2 "error calculating binary checksum: $binary_checksum"
if ! printf '%s' "$checksum" | base64 -d >> "$TEST_FILE_FOLDER/all_checksums.bin"; then
log 2 "error calculating binary checksum and adding to file"
return 1
fi
log 5 "binary checksum: $binary_checksum"
printf "%s" "$binary_checksum" | cat >> "$TEST_FILE_FOLDER/all_checksums.bin"
done
if [ "$1" == "sha256" ]; then
composite=$(openssl dgst -sha256 -binary "$TEST_FILE_FOLDER/all_checksums.bin" | base64)
@@ -96,6 +94,7 @@ calculate_composite_checksum() {
fi
fi
log 5 "composite: $composite"
echo "$composite"
}
test_multipart_upload_with_checksum() {

View File

@@ -118,7 +118,8 @@ send_openssl_go_command_expect_error() {
if ! check_param_count_gt "expected HTTP code, expected error code, expected message, params" 4 $#; then
return 1
fi
if ! result=$(go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" "$AWS_SECRET_ACCESS_KEY" "-url" "$AWS_ENDPOINT_URL" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:4}" 2>&1); then
if ! result=$(go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" \
"$AWS_SECRET_ACCESS_KEY" "-url" "$AWS_ENDPOINT_URL" "-awsRegion" "$AWS_REGION" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:4}" 2>&1); then
log 2 "error sending go command and checking error: $result"
return 1
fi
@@ -133,8 +134,8 @@ send_openssl_go_command() {
if ! check_param_count_gt "expected HTTP code, params" 2 $#; then
return 1
fi
if ! go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" "$AWS_SECRET_ACCESS_KEY" "-awsRegion" "$AWS_REGION" "-url" "$AWS_ENDPOINT_URL" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:2}"; then
log 2 "error sending go command and checking error"
if ! result=$(go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" "$AWS_SECRET_ACCESS_KEY" "-awsRegion" "$AWS_REGION" "-url" "$AWS_ENDPOINT_URL" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:2}" 2>&1); then
log 2 "error sending go command and checking error: $result"
return 1
fi
if ! result=$(send_via_openssl_and_check_code "$TEST_FILE_FOLDER/openssl_command.txt" "$1" 2>&1); then
@@ -148,8 +149,9 @@ send_openssl_go_command_check_header() {
if ! check_param_count_gt "expected HTTP code, header key, value, params" 4 $#; then
return 1
fi
if ! go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" "$AWS_SECRET_ACCESS_KEY" "-url" "$AWS_ENDPOINT_URL" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:4}"; then
log 2 "error sending go command and checking error"
if ! result=$(go run "./tests/rest_scripts/generateCommand.go" "-awsAccessKeyId" "$AWS_ACCESS_KEY_ID" "-awsSecretAccessKey" "$AWS_SECRET_ACCESS_KEY" \
"-awsRegion" "$AWS_REGION" "-url" "$AWS_ENDPOINT_URL" "-client" "openssl" "-filePath" "$TEST_FILE_FOLDER/openssl_command.txt" "${@:4}" 2>&1); then
log 2 "error sending go command and checking error: $result"
return 1
fi
if ! send_via_openssl_and_check_code_header "$TEST_FILE_FOLDER/openssl_command.txt" "$1" "$2" "$3"; then

View File

@@ -245,7 +245,7 @@ func (s *S3Command) addHeaderValues() error {
}
sort.Slice(s.headerValues,
func(i, j int) bool {
return s.headerValues[i][0] < s.headerValues[j][0]
return strings.ToLower(s.headerValues[i][0]) < strings.ToLower(s.headerValues[j][0])
})
return nil
}

View File

@@ -50,7 +50,7 @@ func (s *StreamingUnsignedPayloadWithTrailer) GetContentLength() (int64, error)
if s.omitTrailer {
trailerLength = 4
} else if s.omitTrailerKey {
trailerLength = 1 + checksumValueLength + 4
trailerLength = 3 + checksumValueLength + 4
} else {
trailerLength = 2 + int64(len(s.checksumHeader)) + 1 + checksumValueLength + 4
}

View File

@@ -105,9 +105,6 @@ export RUN_USERS=true
}
@test "REST - can set object lock enabled on existing buckets" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1300"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -124,9 +121,6 @@ export RUN_USERS=true
}
@test "REST - cannot set object lock enabled without content-md5" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1301"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -156,7 +150,7 @@ export RUN_USERS=true
@test "REST - put policy" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skip versitygw-specific users tests"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -186,63 +180,3 @@ export RUN_USERS=true
run delete_object_empty_bucket_check_error
assert_success
}
@test "REST - PutBucketTagging - no payload" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1521"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket_v2 "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "InvalidRequest" "Missing required header" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT"
assert_success
}
@test "REST - PutBucketTagging - invalid Content-MD5" {
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket_v2 "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "InvalidDigest" "you specified" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" \
"-customContentMD5" "dummy" \
"-payload" "<Tagging xmlms=\"http://s3.amazonaws.com/doc/2006-03-01/\"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>"
assert_success
}
@test "REST - PutBucketTagging - invalid Content-MD5 - invalid Content-MD5 itself returned" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1526"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket "$bucket_name"
assert_success
run send_put_bucket_tagging_command_check_invalid_content_md5 "$bucket_name"
assert_success
}
@test "REST - PutBucketTagging - incorrect Content-MD5" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1525"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "BadDigest" "did not match" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" "-incorrectContentMD5" \
"-payload" "<Tagging xmlms=\\\"http://s3.amazonaws.com/doc/2006-03-01/\\\"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>"
assert_success
}

View File

@@ -83,9 +83,6 @@ source ./tests/drivers/put_object/put_object_rest.sh
}
@test "REST - DeleteBucket - invalid x-amz-expected-bucket-owner" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1428"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -93,14 +90,21 @@ source ./tests/drivers/put_object/put_object_rest.sh
run setup_bucket "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "InvalidBucketOwnerAWSAccountID" "value of the expected bucket owner" "-method" "DELETE" "-bucketName" "$bucket_name" "-signedParams" "x-amz-expected-bucket-owner:01234567890"
if [ "$DIRECT" == "true" ]; then
expected_http_code="400"
expected_error_code="InvalidBucketOwnerAWSAccountID"
expected_error="value of the expected bucket owner"
else
expected_http_code="403"
expected_error_code="AccessDenied"
expected_error="Access Denied"
fi
run send_rest_go_command_expect_error "$expected_http_code" "$expected_error_code" "$expected_error" "-method" "DELETE" \
"-bucketName" "$bucket_name" "-signedParams" "x-amz-expected-bucket-owner:a"
assert_success
}
@test "REST - DeleteBucket - incorrect x-amz-expected-bucket-owner" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1428"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"

View File

@@ -26,7 +26,7 @@ export RUN_USERS=true
@test "REST - DeleteBucketOwnershipControls - lack permission" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skip versitygw-specific users tests"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -46,7 +46,7 @@ export RUN_USERS=true
@test "REST - DeleteBucketOwnershipControls - invalid username" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skip versitygw-specific users tests"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success

View File

@@ -28,7 +28,7 @@ export RUN_USERS=true
@test "REST - DeleteBucketTagging - lack permission" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skip versitygw-specific users tests"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success

View File

@@ -21,9 +21,6 @@ source ./tests/setup.sh
source ./tests/drivers/create_bucket/create_bucket_rest.sh
@test "REST - HeadBucket - mismatched owner" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1428"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -36,10 +33,6 @@ source ./tests/drivers/create_bucket/create_bucket_rest.sh
}
@test "REST - HeadBucket - invalid owner" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1428"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -47,7 +40,14 @@ source ./tests/drivers/create_bucket/create_bucket_rest.sh
run setup_bucket "$bucket_name"
assert_success
run head_bucket_rest_expect_error "$bucket_name" "EXPECTED_OWNER=01234567890" "400" "Bad Request"
if [ "$DIRECT" == "true" ]; then
http_code=400
error_code="Bad Request"
else
http_code=403
error_code="Forbidden"
fi
run head_bucket_rest_expect_error "$bucket_name" "EXPECTED_OWNER=01234567890" "$http_code" "$error_code"
assert_success
}

View File

@@ -45,10 +45,6 @@ export RUN_USERS=true
@test "REST - deformed message" {
test_file="test_file"
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1364"
fi
echo -en "abcdefg\r\n\r\n" > "$TEST_FILE_FOLDER/deformed.txt"
run send_via_openssl_check_code_error_contains "$TEST_FILE_FOLDER/deformed.txt" 400 "BadRequest" "An error occurred when parsing the HTTP request."
assert_success
@@ -56,7 +52,7 @@ export RUN_USERS=true
@test "REST - invalid authorization scheme" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1512"
skip "https://github.com/versity/versitygw/issues/1705"
fi
run list_buckets_check_authorization_scheme_error
assert_success
@@ -64,7 +60,7 @@ export RUN_USERS=true
@test "REST - very invalid credential string" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1513"
skip "https://github.com/versity/versitygw/issues/1706"
fi
run send_rest_go_command_expect_error "400" "AuthorizationHeaderMalformed" "the Credential is mal-formed" "-incorrectCredential" "Credentials"
assert_success
@@ -77,7 +73,7 @@ export RUN_USERS=true
@test "REST - invalid year/month/day" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1513"
skip "https://github.com/versity/versitygw/issues/1706"
fi
run send_rest_go_command_expect_error "400" "AuthorizationHeaderMalformed" "incorrect date format" "-invalidYearMonthDay"
assert_success
@@ -93,7 +89,7 @@ export RUN_USERS=true
@test "REST - invalid region" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1513"
skip "https://github.com/versity/versitygw/issues/1706"
fi
run send_rest_go_command_expect_error "400" "AuthorizationHeaderMalformed" "the region 'us-eest-1' is wrong" "-awsRegion" "us-eest-1"
assert_success
@@ -101,7 +97,7 @@ export RUN_USERS=true
@test "REST - invalid service name" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1513"
skip "https://github.com/versity/versitygw/issues/1706"
fi
run send_rest_go_command_expect_error "400" "AuthorizationHeaderMalformed" "incorrect service" "-serviceName" "s2"
assert_success
@@ -191,10 +187,10 @@ export RUN_USERS=true
@test "REST - ListBuckets - correct buckets show up" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skip versitygw-specific users tests"
fi
if [ "$DIRECT" == "true" ]; then
skip
skip "https://github.com/versity/versitygw/issues/1704"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success

View File

@@ -232,9 +232,6 @@ test_file="test_file"
}
@test "REST - multipart checksum w/sha256, full object" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1329"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -279,34 +276,29 @@ test_file="test_file"
assert_success
}
@test "sha256 - calculate composite checksum w/null byte" {
run calculate_composite_checksum "sha256" "Gaq9AN6Uxmk7WaTR9TzgDhE8m8bzXrfJWReDyLoZAo8=" "GohMQZ27EDvwB3n2iDx4irfxkTQDyvpDB7NFeTYaXn8="
assert_success
composite=$output
assert_equal "$composite" "/UpzIA5Rft0d6bSkAlmgESdRE3vtDbo8hzAn//6Z5UU="
}
@test "REST - multipart - composite - sha256" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_multipart_upload_with_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "SHA256"
assert_success
}
@test "REST - multipart - composite - sha1" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_multipart_upload_with_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "SHA1"
assert_success
}
@test "REST - multipart - composite - crc32" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_multipart_upload_with_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "CRC32"
assert_success
}
@test "REST - multipart - composite - crc32c" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_multipart_upload_with_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "CRC32C"
assert_success
}
@@ -332,33 +324,21 @@ test_file="test_file"
}
@test "REST - multipart - composite - incorrect sha256" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_complete_multipart_upload_incorrect_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "SHA256"
assert_success
}
@test "REST - multipart - composite - incorrect sha1" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_complete_multipart_upload_incorrect_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "SHA1"
assert_success
}
@test "REST - multipart - composite - incorrect crc32" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_complete_multipart_upload_incorrect_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "CRC32C"
assert_success
}
@test "REST - multipart - composite - incorrect crc32c" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1359"
fi
run test_complete_multipart_upload_incorrect_checksum "$BUCKET_ONE_NAME" "$test_file" "COMPOSITE" "CRC32C"
assert_success
}

View File

@@ -17,6 +17,7 @@
load ./bats-support/load
load ./bats-assert/load
source ./tests/drivers/create_bucket/create_bucket_rest.sh
source ./tests/drivers/not_implemented/not_implemented_rest.sh
source ./tests/setup.sh
@@ -185,12 +186,6 @@ source ./tests/setup.sh
assert_success
}
@test "REST - GetBucketPolicyStatus" {
skip "https://github.com/versity/versitygw/issues/1454"
run test_not_implemented_expect_failure "$BUCKET_ONE_NAME" "policyStatus=" "GET"
assert_success
}
@test "REST - GetBucketRequestPayment" {
run test_not_implemented_expect_failure "$BUCKET_ONE_NAME" "requestPayment=" "GET"
assert_success

View File

@@ -36,9 +36,6 @@ source ./tests/drivers/put_bucket_tagging/put_bucket_tagging_rest.sh
}
@test "REST PutBucketTagging - tag key with control character" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1579"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -66,9 +63,6 @@ source ./tests/drivers/put_bucket_tagging/put_bucket_tagging_rest.sh
}
@test "REST PutBucketTagging - tag value with control character" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1579"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -121,9 +115,6 @@ source ./tests/drivers/put_bucket_tagging/put_bucket_tagging_rest.sh
}
@test "REST - PutBucketTagging - STREAMING-UNSIGNED-PAYLOAD-TRAILER fails" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1601"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -132,8 +123,74 @@ source ./tests/drivers/put_bucket_tagging/put_bucket_tagging_rest.sh
assert_success
run send_openssl_go_command_expect_error "400" "InvalidRequest" "The value of x-amz-content-sha256 header is invalid" \
"-client" "openssl" "-commandType" "putBucketTagging" "-bucketName" "$bucket_name" "-payload" "abcdefg" \
"-debug" "-logFile" "tagging.log" \
"-client" "openssl" "-commandType" "putBucketTagging" "-bucketName" "$bucket_name" "-payload" "abcdefg" "-checksumType" "sha256" \
"-payloadType" "STREAMING-UNSIGNED-PAYLOAD-TRAILER" "-chunkSize" "8192" "-tagKey" "key" "-tagValue" "value"
assert_success
}
@test "REST - PutBucketTagging - no payload" {
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket_v2 "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "MissingRequestBodyError" "Request Body is empty" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" "-contentMD5"
assert_success
}
@test "REST - PutBucketTagging - invalid Content-MD5" {
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket_v2 "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "InvalidDigest" "you specified" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" \
"-customContentMD5" "dummy" \
"-payload" "<Tagging xmlms=\"http://s3.amazonaws.com/doc/2006-03-01/\"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>"
assert_success
}
@test "REST - PutBucketTagging - invalid Content-MD5 - invalid Content-MD5 itself returned" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1526"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket "$bucket_name"
assert_success
run send_put_bucket_tagging_command_check_invalid_content_md5 "$bucket_name"
assert_success
}
@test "REST - PutBucketTagging - incorrect Content-MD5" {
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "BadDigest" "did not match" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" "-incorrectContentMD5" \
"-payload" "<Tagging xmlms=\"http://s3.amazonaws.com/doc/2006-03-01/\"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>"
assert_success
}
@test "REST - PutBucketTagging - missing Content-MD5" {
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
run setup_bucket_v2 "$bucket_name"
assert_success
run send_rest_go_command_expect_error "400" "InvalidRequest" "Missing required header for this request" "-bucketName" "$bucket_name" "-query" "tagging=" "-method" "PUT" \
"-payload" "<Tagging xmlms=\"http://s3.amazonaws.com/doc/2006-03-01/\"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>"
assert_success
}

View File

@@ -115,7 +115,7 @@ export RUN_USERS=true
@test "REST - PutObject - If-None-Match - no asterisk" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
skip "https://github.com/versity/versitygw/issues/1708"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -125,13 +125,13 @@ export RUN_USERS=true
assert_success
run send_rest_go_command_expect_error "501" "NotImplemented" "not implemented" "-bucketName" "$bucket_name" "-objectKey" "$test_file" "-method" "PUT" "-payloadFile" "$TEST_FILE_FOLDER/$test_file" \
"-signedParams" "if-none-match:true"
"-signedParams" "If-None-Match:true"
assert_success
}
@test "REST - PutObject - If-None-Match - block copy" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
skip "https://github.com/versity/versitygw/issues/1708"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -141,14 +141,11 @@ export RUN_USERS=true
assert_success
run send_rest_go_command_expect_error "412" "PreconditionFailed" "did not hold" "-bucketName" "$bucket_name" "-objectKey" "$test_file" "-method" "PUT" "-payloadFile" "$TEST_FILE_FOLDER/$test_file" \
"-signedParams" "if-none-match:*"
"-signedParams" "If-None-Match:*"
assert_success
}
@test "REST - PutObject - If-None-Match - success" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -163,7 +160,7 @@ export RUN_USERS=true
@test "REST - PutObject - If-Match - file doesn't exist on server" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
skip "https://github.com/versity/versitygw/issues/1709"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -178,9 +175,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - If-Match - incorrect etag" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -195,7 +189,7 @@ export RUN_USERS=true
@test "REST - PutObject - If-Match - correct etag" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/821"
skip "https://github.com/versity/versitygw/issues/1710"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -235,7 +229,7 @@ export RUN_USERS=true
@test "REST - PutObject - user permission, bad signature" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -252,7 +246,7 @@ export RUN_USERS=true
@test "REST - PutObject - expect continue - success" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1517"
skip "https://github.com/versity/versitygw/issues/1707"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
@@ -262,14 +256,11 @@ export RUN_USERS=true
assert_success
run send_rest_go_command "200" "-bucketName" "$bucket_name" "-objectKey" "$test_file" "-method" "PUT" "-payloadFile" "$TEST_FILE_FOLDER/$test_file" \
"-signedParams" "Expect:100-continue" "-debug" "-logFile" "tagging.log"
"-signedParams" "Expect:100-continue"
assert_success
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER, x-amz-trailer of crc32, trailer missing" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1600"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -285,9 +276,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER - 200 header returns correct checksum type" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1607"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -304,9 +292,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER - success (sha1)" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1607"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -326,9 +311,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER - success (crc32)" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1607"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -348,9 +330,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER - success (crc32c)" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1607"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -410,9 +389,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER, x-amz-trailer of crc32, trailer key missing" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1626"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"
@@ -428,9 +404,6 @@ export RUN_USERS=true
}
@test "REST - PutObject - STREAMING-UNSIGNED-PAYLOAD-TRAILER - default crc64nvme" {
if [ "$DIRECT" != "true" ]; then
skip "https://github.com/versity/versitygw/issues/1632"
fi
run get_bucket_name "$BUCKET_ONE_NAME"
assert_success
bucket_name="$output"

View File

@@ -106,7 +106,7 @@ test_get_object_attributes_s3api_root() {
test_get_put_object_legal_hold_s3api_root() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
bucket_file="bucket_file"
username=$USERNAME_ONE
@@ -140,7 +140,7 @@ test_get_put_object_legal_hold_s3api_root() {
test_get_put_object_retention_s3api_root() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
bucket_file="bucket_file"
username=$USERNAME_ONE
@@ -175,7 +175,7 @@ test_get_put_object_retention_s3api_root() {
test_retention_bypass_s3api_root() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
bucket_file="bucket_file"
username=$USERNAME_ONE

View File

@@ -36,7 +36,7 @@ export RUN_USERS=true
@test "test_delete_user_no_access_key" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
run delete_user ""
assert_failure
@@ -52,7 +52,7 @@ export RUN_USERS=true
@test "test_user_get_object" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
test_file="test_file"
@@ -79,7 +79,7 @@ export RUN_USERS=true
@test "test_userplus_get_object" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
test_file="test_file"
@@ -106,7 +106,7 @@ export RUN_USERS=true
@test "test_user_delete_object" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
test_file="test_file"
@@ -133,7 +133,7 @@ export RUN_USERS=true
@test "test_admin_put_get_object" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
test_file="test_file"
@@ -164,7 +164,7 @@ export RUN_USERS=true
@test "test_user_create_multipart_upload" {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
test_file="test_file"

View File

@@ -23,7 +23,7 @@ source ./tests/commands/list_buckets.sh
test_admin_user() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
admin_username="$USERNAME_ONE"
admin_password="$PASSWORD_ONE"
@@ -62,7 +62,7 @@ test_admin_user() {
test_create_user_already_exists() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
username="$USERNAME_ONE"
password="$PASSWORD_ONE"
@@ -76,7 +76,7 @@ test_create_user_already_exists() {
test_user_user() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
if [ "$RECREATE_BUCKETS" == "false" ]; then
skip "test not valid for static buckets"
@@ -115,7 +115,7 @@ test_user_user() {
test_userplus_operation() {
if [ "$SKIP_USERS_TESTS" == "true" ]; then
skip
skip "skipping versitygw-specific users tests"
fi
username="$USERNAME_ONE"
password="$PASSWORD_ONE"