ArafatKhan2198 commented on code in PR #4682:
URL: https://github.com/apache/ozone/pull/4682#discussion_r1195702492
##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/server/TestServerUtils.java:
##########
@@ -18,25 +18,145 @@
package org.apache.hadoop.hdds.server;
import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.PosixFilePermission;
+import java.nio.file.attribute.PosixFilePermissions;
+import java.util.Set;
import org.apache.hadoop.hdds.HddsConfigKeys;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.test.PathUtils;
import org.apache.commons.io.FileUtils;
-import org.junit.jupiter.api.Test;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
-import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+
/**
* Unit tests for {@link ServerUtils}.
*/
public class TestServerUtils {
+ @Rule
+ public TemporaryFolder folder = new TemporaryFolder();
+
+ /**
+ * Test case for {@link ServerUtils#getPermissions}.
+ * Verifies the retrieval of permissions for different configs.
+ */
+ @Test
+ public void testGetPermissions() {
+ // Create an OzoneConfiguration object and set the permissions
+ // for different keys
+ OzoneConfiguration conf = new OzoneConfiguration();
+ conf.set("ozone.recon.db.dir.perm", "750");
Review Comment:
Thanks for the comment @jojochuang I have made the changes!
--
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]