From b7cb7eaaa01bcb702d249e997aa1dc985c488da3 Mon Sep 17 00:00:00 2001 From: Alexandr Juncevich Date: Thu, 26 Dec 2024 10:23:44 +0300 Subject: [PATCH] HDDS-11699. Add robot tests --- .../src/main/smoketest/s3/objectputget.robot | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot b/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot index 82a985f1d50f..4e9bcfe1a0ae 100644 --- a/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot +++ b/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot @@ -270,3 +270,36 @@ 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 /tmp/big_file + ${result} Execute AWSS3CliDebug cp /tmp/big_file s3://${BUCKET}/ + ${get_part_1_response} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_1 --part-number 1 + ${part_1_size} = Execute and checkrc echo '${get_part_1_response}' | jq -r '.ContentLength' 0 + Should contain ${get_part_1_response} \"PartsCount\": 2 + ${get_part_2_response} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_2 --part-number 2 + ${part_2_size} = Execute and checkrc echo '${get_part_2_response}' | jq -r '.ContentLength' 0 + Should contain ${get_part_2_response} \"PartsCount\": 2 + + Should Be Equal As Integers 10000000 ${${part_1_size} + ${part_2_size}} + + ${get_part_3_response} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_3 --part-number 3 + Should contain ${get_part_3_response} \"ContentLength\": 0 + Should contain ${get_part_3_response} \"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 not existed part number + Execute head -c 10000000 /tmp/big_file + ${result} Execute AWSS3CliDebug cp /tmp/big_file s3://${BUCKET}/ + ${get_part_99_response} Execute AWSS3APICli get-object --bucket ${BUCKET} --key big_file /tmp/big_file_1 --part-number 99 + Should contain ${get_part_99_response} \"ContentLength\": 0 + Should contain ${get_part_99_response} \"PartsCount\": 2 + # clean up + Execute AWSS3Cli rm s3://${BUCKET}/big_file + Execute rm -rf /tmp/big_file + Execute rm -rf /tmp/big_file_1 \ No newline at end of file