Russole opened a new pull request, #9371:
URL: https://github.com/apache/ozone/pull/9371

   ## What changes were proposed in this pull request?
   
   This PR improves and expands the test coverage of the PUT Bucket ACL 
operation in BucketEndpoint, ensuring correct handling of S3 ACL semantics 
under different request formats.
   
   * Added VALID_ACL_XML constant to provide a reusable, well-formed S3 ACL 
body for tests.
   
   * Added new test cases to fully validate the behavior of PUT /{bucket}?acl:
   
   * Missing ACL headers with a valid XML body should succeed.
   
   * Missing ACL headers and missing body should fail with a 
WebApplicationException caused by an OS3Exception with InvalidRequest.
   
   * PUT ACL on a non-existing bucket should throw an OS3Exception with 
NoSuchBucket.
   
   * Header-based ACL update using x-amz-grant-full-control should succeed.
   
   * Invalid XML body (non-XML input) should trigger an OS3Exception with 
InvalidRequest.
   
   * Malformed ACL grant header (e.g., missing "=") should produce an 
OS3Exception with InvalidArgument.
   
   * Removed two ineffective test cases (testBucketFailWithAuthHeaderMissing 
and testBucketFailWithInvalidHeader) because they used a try/catch without 
assertThrows, causing them to pass even when no exception was thrown.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-13932
   
   ## How was this patch tested?
   
   This patch includes new and enhanced unit tests in TestBucketPut to verify 
the updated behavior.
   All tests were executed locally and passed.
   Additionally, all CI pipelines passed after the patch was pushed.


-- 
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