Skip to content

Commit

Permalink
HDDS-11699. Add robot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juncevich committed Dec 26, 2024
1 parent ce79953 commit a2451e2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,37 @@ Create key twice with different content and expect different ETags
Execute AWSS3Cli rm s3://${BUCKET}/test_key_to_check_etag_differences
Execute rm -rf /tmp/file1
Execute rm -rf /tmp/file2

Create&Download big file by multipart upload and get file via part numbers
Execute head -c 10000000 </dev/urandom > /tmp/big_file
${result} Execute AWSS3CliDebug cp /tmp/big_file s3://${BUCKET}/
${result_1} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_1 --part-number 1
Log ${result_1}
Should contain ${result_1} \"ContentLength\": 5242880
Should contain ${result_1} \"PartsCount\": 2
${result_2} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_2 --part-number 2
Log ${result_2}
Should contain ${result_2} \"ContentLength\": 4757120
Should contain ${result_1} \"PartsCount\": 2
${result_3} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_3 --part-number 3
Log ${result_3}
Should contain ${result_3} \"ContentLength\": 0
Should contain ${result_1} \"PartsCount\": 2
# clean up
Execute AWSS3Cli rm s3://${BUCKET}/big_file
Execute rm -rf /tmp/big_file
Execute rm -rf /tmp/big_file_1
Execute rm -rf /tmp/big_file_2
Execute rm -rf /tmp/big_file_3

Create&Download big file by multipart upload and get file by not existed part number
Execute head -c 10000000 </dev/urandom > /tmp/big_file
${result} Execute AWSS3CliDebug cp /tmp/big_file s3://${BUCKET}/
${result_1} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_1 --part-number 99
Log ${result_1}
Should contain ${result_1} \"ContentLength\": 0
Should contain ${result_1} \"PartsCount\": 2
# clean up
Execute AWSS3Cli rm s3://${BUCKET}/big_file
Execute rm -rf /tmp/big_file
Execute rm -rf /tmp/big_file_1

0 comments on commit a2451e2

Please sign in to comment.