ashishkumar50 commented on code in PR #11240:
URL: https://github.com/apache/ozone/pull/11240#discussion_r4022763623


##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
@@ -42,6 +47,59 @@ Create bucket with invalid bucket name
     ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket invalid_bucket_${randStr}   255
                         Should contain          ${result}           
InvalidBucketName
 
+Create bucket with name too short
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket ab   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with name too long
+    ${bucket} =         Evaluate    'a' * 64
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket ${bucket}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with all uppercase characters in bucket name
+    ${randStr} =        Generate Random String     8    [UPPER]
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket BUCKET${randStr}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with mixed uppercase characters in bucket name
+    ${randStr} =        Generate Random String     8    [LOWER]
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket BuCkEt-${randStr}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names can consist only of lowercase letters, numbers, 
periods (.), and hyphens (-).
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket test#12-$   255
+                        Should contain          ${result}           Invalid 
bucket name

Review Comment:
   `test#12-$ `appears to be rejected by the AWS CLI client before the request 
reaches the S3 Gateway. Since this PR is intended to provide Ozone S3 Gateway 
smoketest coverage, this case doesn't provide regression coverage for Ozone. 
   It could be addressed separately in another PR.



##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot:
##########
@@ -42,6 +47,59 @@ Create bucket with invalid bucket name
     ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket invalid_bucket_${randStr}   255
                         Should contain          ${result}           
InvalidBucketName
 
+Create bucket with name too short
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket ab   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with name too long
+    ${bucket} =         Evaluate    'a' * 64
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket ${bucket}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with all uppercase characters in bucket name
+    ${randStr} =        Generate Random String     8    [UPPER]
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket BUCKET${randStr}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket with mixed uppercase characters in bucket name
+    ${randStr} =        Generate Random String     8    [LOWER]
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket BuCkEt-${randStr}   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names can consist only of lowercase letters, numbers, 
periods (.), and hyphens (-).
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket test#12-$   255
+                        Should contain          ${result}           Invalid 
bucket name
+
+Create bucket validate names must begin and end with a letter or number.
+    ${randStr} =        Generate Random String     8    [LOWER]
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket bucket-${randStr}-   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names must not contain two adjacent periods.
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket test..bucket   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names must not be formatted as an IP address (for 
example, 192.168.5.4).
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket 192.168.5.4   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names must not contain leading dash
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket=-test   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names must not contain leading period
+    ${result} =         Execute AWSS3APICli and checkrc         create-bucket 
--bucket .test   255
+                        Should contain          ${result}           
InvalidBucketName
+
+Create bucket validate names must not contain Trailing period

Review Comment:
   nit: `trailing period`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to