mladjan-gadzic commented on code in PR #4448:
URL: https://github.com/apache/ozone/pull/4448#discussion_r1217633737
##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestObjectGet.java:
##########
@@ -224,4 +227,26 @@ private void setDefaultHeader() {
doReturn(CONTENT_ENCODING1)
.when(headers).getHeaderString("Content-Encoding");
}
+
+ @Test
+ public void testGetWhenKeyIsDirectoryAndDoesNotEndWithASlash()
+ throws IOException {
+ // GIVEN
+ final String bucketName = "b1";
+ final String keyPath = "keyDir";
+ OzoneConfiguration config = new OzoneConfiguration();
+ config.set(OZONE_S3G_FSO_DIRECTORY_CREATION_ENABLED, "true");
+ rest.setOzoneConfiguration(config);
+ OzoneBucket bucket = client.getObjectStore().getS3Bucket(bucketName);
+ bucket.createDirectory(keyPath);
+
+ // WHEN
+ final OS3Exception ex =
+ Assertions.assertThrows(OS3Exception.class,
+ () -> rest.get(bucketName, keyPath, null, 0, null, body));
Review Comment:
It is connected with
[https://github.com/apache/ozone/commit/ac42bf0c779a46920971fb4f0d8c8bbe7f2171a7#diff-fa46c2b691ace246572f975dc2119ab738a19d283ac7848d35e78e8a2709af96L73](https://github.com/apache/ozone/commit/ac42bf0c779a46920971fb4f0d8c8bbe7f2171a7#diff-fa46c2b691ace246572f975dc2119ab738a19d283ac7848d35e78e8a2709af96L73)
change. I merged upstream/master and resolved conflicts. It should be fine now.
--
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]