You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2024/07/02 06:42:00 UTC

(ozone) branch master updated: HDDS-11095. Generate fixed length string with Robot builtin (#6895)

This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 34362b07b3 HDDS-11095. Generate fixed length string with Robot builtin (#6895)
34362b07b3 is described below

commit 34362b07b341f3474ff05057cc8b87bee764f238
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Tue Jul 2 08:41:54 2024 +0200

    HDDS-11095. Generate fixed length string with Robot builtin (#6895)
---
 hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot | 2 +-
 hadoop-ozone/dist/src/main/smoketest/s3/objectcopy.robot      | 4 ++--
 hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot    | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot b/hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot
index 2c4195fcb1..33f3e2c7a9 100644
--- a/hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/s3/MultipartUpload.robot
@@ -158,7 +158,7 @@ Test Multipart Upload Complete
     Compare files               /tmp/part2        /tmp/${PREFIX}-multipartKey1-part2.result
 
 Test Multipart Upload with user defined metadata size larger than 2 KB
-    ${custom_metadata_value} =  Execute                               printf 'v%.0s' {1..3000}
+    ${custom_metadata_value} =  Generate Random String   3000
     ${result} =                 Execute AWSS3APICli and checkrc       create-multipart-upload --bucket ${BUCKET} --key ${PREFIX}/mpuWithLargeMetadata --metadata="custom-key1=${custom_metadata_value}"    255
                                 Should contain                        ${result}   MetadataTooLarge
                                 Should not contain                    ${result}   custom-key1: ${custom_metadata_value}
diff --git a/hadoop-ozone/dist/src/main/smoketest/s3/objectcopy.robot b/hadoop-ozone/dist/src/main/smoketest/s3/objectcopy.robot
index b12199e300..34fe7d1b3e 100644
--- a/hadoop-ozone/dist/src/main/smoketest/s3/objectcopy.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/s3/objectcopy.robot
@@ -112,6 +112,6 @@ Copy Object using an invalid copy directive
 
 Copy Object with user defined metadata size larger than 2 KB
                                 Execute                    echo "Randomtext" > /tmp/testfile2
-    ${custom_metadata_value} =  Execute                    printf 'v%.0s' {1..3000}
+    ${custom_metadata_value} =  Generate Random String    3000
     ${result} =                 Execute AWSS3ApiCli and checkrc       copy-object --bucket ${DESTBUCKET} --key ${PREFIX}/copyobject/key=value/f1 --copy-source ${BUCKET}/${PREFIX}/copyobject/key=value/f1 --metadata="custom-key1=${custom_metadata_value}" --metadata-directive REPLACE       255
-                                Should contain                        ${result}   MetadataTooLarge
\ No newline at end of file
+                                Should contain                        ${result}   MetadataTooLarge
diff --git a/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot b/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot
index 4e725b036e..12fb985348 100644
--- a/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/s3/objectputget.robot
@@ -191,7 +191,7 @@ Create file with user defined metadata with gdpr enabled value in request
 
 Create file with user defined metadata size larger than 2 KB
                                 Execute                    echo "Randomtext" > /tmp/testfile2
-    ${custom_metadata_value} =  Execute                    printf 'v%.0s' {1..3000}
+    ${custom_metadata_value} =  Generate Random String    3000
     ${result} =                 Execute AWSS3APICli and checkrc       put-object --bucket ${BUCKET} --key ${PREFIX}/putobject/custom-metadata/key2 --body /tmp/testfile2 --metadata="custom-key1=${custom_metadata_value}"    255
                                 Should contain                        ${result}   MetadataTooLarge
                                 Should not contain                    ${result}   custom-key1: ${custom_metadata_value}
@@ -199,10 +199,10 @@ Create file with user defined metadata size larger than 2 KB
 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=tag-value1&tag-key1=tag-value2"    255
                                 Should contain                        ${result}   InvalidTag
-    ${long_tag_key} =           Execute                               printf 'v%.0s' {1..129}
+    ${long_tag_key} =           Generate Random String    129
     ${result} =                 Execute AWSS3APICli and checkrc       put-object --bucket ${BUCKET} --key ${PREFIX}/putobject/custom-metadata/key2 --body /tmp/testfile2 --tagging="${long_tag_key}=tag-value1"    255
                                 Should contain                        ${result}   InvalidTag
-    ${long_tag_value} =         Execute                               printf 'v%.0s' {1..257}
+    ${long_tag_value} =         Generate Random String    257
     ${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
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org