sreejasahithi commented on code in PR #12094:
URL: https://github.com/apache/ozone/pull/12094#discussion_r4627690733
##########
hadoop-ozone/integration-test-s3/src/test/java/org/apache/hadoop/ozone/s3/awssdk/v2/AbstractS3SDKV2Tests.java:
##########
@@ -1621,6 +1621,45 @@ public void testPutObjectWithWrongMD5Header(String
contentMD5, String expectedEr
assertThrows(NoSuchKeyException.class, () -> s3Client.headObject(b ->
b.bucket(bucketName).key(keyName)));
}
+ @Test
+ public void testDeleteObjectsWithMD5Header() {
+ final String bucketName = getBucketName();
+ final String keyName = getKeyName();
+ s3Client.createBucket(b -> b.bucket(bucketName));
+ s3Client.putObject(b -> b.bucket(bucketName).key(keyName),
RequestBody.fromString("bar"));
Review Comment:
This test testDeleteObjectsWithMD5Header doesn't set Content-MD5, and the
client uses SDK defaults. On SDK 2.55.6 DeleteObjects doesn't send Content-MD5
by default. it sends x-amz-sdk-checksum-algorithm: CRC32 instead.
validateDeleteContentMD5 skips when the header is absent, so the test passes
without the new code running.
--
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]