anujmodi2021 commented on code in PR #8607:
URL: https://github.com/apache/hadoop/pull/8607#discussion_r3640254693
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFilesystemAcl.java:
##########
@@ -1529,4 +1533,281 @@ private void assertPermission(FileSystem fs, Path
pathToCheck, short perm)
throws Exception {
AclTestHelpers.assertPermission(fs, pathToCheck, perm);
}
+
+ // =========================================================================
+ // Tests for fs.azure.rbac.only mode.
+ //
+ // When fs.azure.rbac.only=true on an HNS-enabled account:
+ // - setPermission() must be a no-op (permission is not updated on the
+ // backend) so RBAC-only workloads are not blocked by lack of
+ // ACL-management permissions.
+ // - Explicit ACL management APIs (setAcl, modifyAclEntries,
+ // removeAclEntries, removeDefaultAcl, removeAcl) must be unaffected.
+ //
+ // On non-HNS accounts the flag must have no effect (existing behavior).
+ // =========================================================================
+
+ /**
+ * When RBAC-only mode is enabled on an HNS-enabled account, setPermission
+ * must be treated as a no-op: the on-storage permission stays at whatever
+ * it was before the setPermission() call.
+ */
+ @Test
+ public void testSetPermissionNoOpWhenRbacOnlyEnabledOnHns() throws Exception
{
+ final AzureBlobFileSystem fs = getRbacOnlyFileSystem(true);
Review Comment:
try for autoclose here and in all the new tests
--
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]