errose28 commented on code in PR #7591:
URL: https://github.com/apache/ozone/pull/7591#discussion_r1901152550


##########
hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/repair/TestOzoneRepair.java:
##########
@@ -79,10 +79,19 @@ void 
testOzoneRepairWhenUserIsRemindedSystemUserAndAgreesToProceed() throws Exce
     OzoneRepair ozoneRepair = new OzoneRepair();
     System.setIn(new ByteArrayInputStream("y".getBytes(DEFAULT_ENCODING)));
 
-    ozoneRepair.execute(new String[]{});
+    ozoneRepair.execute(new String[]{"om", "fso-tree"});
     assertThat(out.toString(DEFAULT_ENCODING)).contains("Run as user: " + 
OZONE_USER);
     // prompt should contain the current user name as well
     assertThat(err.toString(DEFAULT_ENCODING)).contains("ATTENTION: Running as 
user " + OZONE_USER);
   }
 
+  @Test
+  void testOzoneRepairSkipsPromptWhenNoSubcommandProvided() throws Exception {
+    OzoneRepair ozoneRepair = new OzoneRepair();
+
+    // when no argument is passed, prompt should not be displayed

Review Comment:
   Can we quickly test the -h and --help flags here too?



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/OzoneRepair.java:
##########
@@ -31,7 +31,8 @@
  * Ozone Repair Command line tool.
  */
 @CommandLine.Command(name = "ozone repair",
-    description = "Operational tool to repair Ozone",
+    description = "Repair is an advanced operation and the nodes being 
repaired " +
+        "should be stopped while it is running.",

Review Comment:
   ```suggestion
       description = "Advanced tool to repair Ozone. The nodes being repaired " 
+
                "must be stopped before the tool is run.",
   ```



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