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

HDDS-10435. Support S3 object tags for existing requests #6607

Merged
merged 10 commits into from
May 22, 2024
Prev Previous commit
Next Next commit
Acceptance test for too many tags
ivandika3 committed May 7, 2024
commit 6fb913181e122610055615c6da9d61a63023709f
11 changes: 11 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot
Original file line number Diff line number Diff line change
@@ -206,6 +206,17 @@ Create files invalid tags
${result} = Execute AWSS3APICli and checkrc put-object --bucket ${BUCKET} --key ${PREFIX}/putobject/custom-metadata/key2 --body /tmp/testfile2 --tagging="tag-key1=${long_tag_value}" 255
Should contain ${result} InvalidTag

Create files with too many tags
Execute echo "Randomtext" > /tmp/testfile2
@{tags_list} = Create List
FOR ${i} IN RANGE 11
Append To List ${tags_list} tag-key-${i}=tag-value-${i}
END

${tags_over_limit} = Catenate SEPARATOR=& @{tags_list}
${result} = Execute AWSS3APICli and checkrc put-object --bucket ${BUCKET} --key ${PREFIX}/putobject/custom-metadata/key2 --body /tmp/testfile2 --tagging="${tags_over_limit}" 255
Should contain ${result} InvalidTag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: might make sense to check the case with a tags list size of more than 10 too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Create small file and expect ETag (MD5) in a reponse header
Execute head -c 1MB </dev/urandom > /tmp/small_file
${file_md5_checksum} = Execute md5sum /tmp/small_file | awk '{print $1}'