art9440 commented on code in PR #9774:
URL: https://github.com/apache/ozone/pull/9774#discussion_r2820643634


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMSetTimesRequest.java:
##########
@@ -61,6 +67,33 @@ public void testKeySetTimesRequest() throws Exception {
     assertEquals(mtime, keyMtime);
   }
 
+  @Test
+  public void preExecutePermissionDeniedWhenAclEnabled() throws Exception {
+    OMRequestTestUtils.addVolumeAndBucketToDB(volumeName, bucketName,
+        omMetadataManager, getBucketLayout());
+    addKeyToTable();
+
+    when(ozoneManager.getAclsEnabled()).thenReturn(true);
+
+    OMRequest req = createSetTimesKeyRequest(2000, 1000);
+
+    OMKeySetTimesRequest setTimes = new OMKeySetTimesRequest(req, 
getBucketLayout()) {
+      @Override
+      public void checkAcls(OzoneManager ozoneManager, 
+          OzoneObj.ResourceType resType,
+          OzoneObj.StoreType storeType,
+          IAccessAuthorizer.ACLType aclType,
+          String vol, String bucket, String key) throws IOException
+      {
+        throw new OMException("denied", 
OMException.ResultCodes.PERMISSION_DENIED);
+      }

Review Comment:
   Fixed



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