You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/09/01 19:51:03 UTC

[GitHub] [cassandra] driftx commented on a change in pull request #704: Cassandra 15991

driftx commented on a change in pull request #704:
URL: https://github.com/apache/cassandra/pull/704#discussion_r481392461



##########
File path: test/unit/org/apache/cassandra/tools/AuditLogViewerTest.java
##########
@@ -61,6 +71,65 @@ public void tearDown() throws IOException
         }
     }
 
+    @Test
+    public void testNoArgs()
+    {
+        ToolRunner tool = runner.invokeTool(toolPath);
+        assertTrue(tool.getStdout(), tool.getStdout().contains("usage:"));
+        assertTrue(tool.getCleanedStderr(), tool.getCleanedStderr().contains("Audit log files directory path is a required argument."));
+        assertEquals(1, tool.getExitCode());
+    }
+
+    @Test
+    public void testMaybeChangeDocs()
+    {
+        // If you added, modified options or help, please update docs if necessary
+        ToolRunner tool = runner.invokeTool(toolPath, "-h");
+        assertEquals("34aea94756d4f6760b836dfbfa7bbf06", DigestUtils.md5Hex(tool.getStdout()));

Review comment:
       I don't understand how, given that the plaintext and md5 equate 1:1, using the text was fiddly?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org