aryangupta1998 commented on a change in pull request #2357:
URL: https://github.com/apache/ozone/pull/2357#discussion_r658256317
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestObjectStoreWithFSO.java
##########
@@ -622,6 +621,40 @@ public void testRenameToAnExistingKey() throws Exception {
}
}
+ @Test
+ public void testCreateBucketWithBucketType() throws Exception {
+ String sampleVolumeName = UUID.randomUUID().toString();
+ String sampleBucketName = UUID.randomUUID().toString();
+ OzoneClient client = cluster.getClient();
+ ObjectStore store = client.getObjectStore();
+ store.createVolume(sampleVolumeName);
+ OzoneVolume volume = store.getVolume(sampleVolumeName);
+
+ // Case 1: Bucket Type: FSO
+ BucketArgs.Builder builder = BucketArgs.newBuilder();
+ builder.setBucketType(BucketType.FSO);
+ volume.createBucket(sampleBucketName, builder.build());
+ OzoneBucket bucket = volume.getBucket(sampleBucketName);
+ Assert.assertEquals(sampleBucketName, bucket.getName());
+ Assert.assertEquals(BucketType.FSO, bucket.getBucketType());
+
+ // Case 2: Bucket Type: OBJECT_STORE
+ sampleBucketName = UUID.randomUUID().toString();
+ builder.setBucketType(BucketType.OBJECT_STORE);
+ volume.createBucket(sampleBucketName, builder.build());
+ bucket = volume.getBucket(sampleBucketName);
+ Assert.assertEquals(sampleBucketName, bucket.getName());
+ Assert.assertEquals(BucketType.OBJECT_STORE, bucket.getBucketType());
+
+ // Case 3: Bucket Type: Empty
Review comment:
Removed `builder.setBucketType(BucketType.DEFAULT);` and added `// Case
4: Bucket Type: DEFAULT`
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]