This is an automated email from the ASF dual-hosted git repository.
ashishkumar50 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 2ce22d95300 HDDS-12869. Add some corner cases in create bucket (#11240)
2ce22d95300 is described below
commit 2ce22d95300c798513ecf3764fe82437e97e706e
Author: rajeshkumarchandolu <[email protected]>
AuthorDate: Wed Sep 16 18:22:25 2026 +0530
HDDS-12869. Add some corner cases in create bucket (#11240)
---
.../dist/src/main/smoketest/s3/bucketcreate.robot | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot
b/hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot
index 3b86e610f3d..a121df502b6 100644
--- a/hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot
@@ -32,6 +32,11 @@ ${BUCKET} generated
Create new bucket
Create bucket
+Create bucket with maximum valid name length
+ ${randStr} = Generate Random String 62 [LOWER]
+ ${bucket} = Set Variable b${randStr}
+ Create bucket with name ${bucket}
+
Create bucket which already exists
${bucket} = Create bucket
${result} = Execute AWSS3APICli and checkrc create-bucket
--bucket ${bucket} 255
@@ -42,6 +47,56 @@ 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 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
+ ${result} = Execute AWSS3APICli and checkrc create-bucket
--bucket test. 255
+ Should contain ${result}
InvalidBucketName
+
+Create bucket validate names must not contain all numeric
+ ${randStr} = Generate Random String 8 [NUMBERS]
+ ${result} = Execute AWSS3APICli and checkrc create-bucket
--bucket ${randStr} 255
+ Should contain ${result}
InvalidBucketName
+
Create new bucket and check default group ACL
[tags] aws-skip
${bucket} = Create bucket
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]