ivandika3 commented on code in PR #8558:
URL: https://github.com/apache/ozone/pull/8558#discussion_r2134400058
##########
hadoop-ozone/integration-test-s3/src/test/java/org/apache/hadoop/ozone/s3/awssdk/v2/AbstractS3SDKV2Tests.java:
##########
@@ -621,4 +648,512 @@ private void completeMultipartUpload(String bucketName,
String key, String uploa
assertEquals(bucketName, compResponse.bucket());
assertEquals(key, compResponse.key());
}
+
+ @Nested
+ @TestInstance(TestInstance.Lifecycle.PER_CLASS)
+ class S3BucketVerificationConditionTests {
+
+ private static final String DEFAULT_BUCKET_NAME = "default-bucket";
+ private String correctOwner;
+ private static final String WRONG_OWNER = "wrong-owner";
+ private static final String BUCKET_VERIFICATION_TEST_KEY = "test-key";
+
+ @BeforeAll
+ public void setup() throws Exception {
Review Comment:
Thanks for the extensive tests.
For completeness, we can try to add a ownership check on linked bucket. This
can be done by 1) creating a bucket under volume other than `/s3v` volume and
then 2) create a link bucket under the `/s3v` volume referring to the source
bucket. You can take a look at `LinkBucketHandler` for the implementation.
Since `OzoneManager#getBucketInfo` will resolve the bucket link and check the
source bucket info (including the owner), there should not be any issues.
Additionally, we can also test on the dangling bucket. This can be done by
1) creating a bucket under volume other than `/s3v` volume and then 2) create a
link bucket under the `/s3v` volume referring to the source bucket and 3)
deleting the source bucket. I think for this case this will return null owner
since the linked bucket does not contain owner field.
--
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]