psalagnac commented on code in PR #3258: URL: https://github.com/apache/solr/pull/3258#discussion_r1990122985
########## solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java: ########## @@ -298,23 +295,10 @@ public void testBasicAuth() throws Exception { verifySecurityStatus(cl, baseUrl + "/admin/info/key", "key", NOT_NULL_PREDICATE, 20); assertAuthMetricsMinimums(17, 8, 8, 1, 0, 0); - String[] toolArgs = - new String[] {"status", "--solr-url", baseUrl, "--credentials", "harry:HarryIsUberCool"}; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream stdoutSim = new PrintStream(baos, true, StandardCharsets.UTF_8.name()); - StatusTool tool = new StatusTool(stdoutSim); - try { - tool.runTool(SolrCLI.processCommandLineArgs(tool, toolArgs)); - Map<?, ?> obj = (Map<?, ?>) Utils.fromJSON(new ByteArrayInputStream(baos.toByteArray())); - assertTrue(obj.containsKey("version")); - assertTrue(obj.containsKey("startTime")); - assertTrue(obj.containsKey("uptime")); - assertTrue(obj.containsKey("memory")); - } catch (Exception e) { - log.error( - "StatusTool failed due to: {}; stdout from tool prior to failure: {}", - e, - baos.toString(StandardCharsets.UTF_8.name())); // nowarn + String[] toolArgs = new String[] {"status", "--solr-url", baseUrl}; Review Comment: Here, I removed credential parameters to force a failure of the tool. My understanding is these parameters were wrongly added in #3154. Before that change, first execution of the tool was failing, and the test expects that. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org