MarcusSorealheis commented on a change in pull request #805: SOLR-13649 change 
the default behavior of the basic authentication plugin.
URL: https://github.com/apache/lucene-solr/pull/805#discussion_r318374760
 
 

 ##########
 File path: 
solr/core/src/test/org/apache/solr/handler/admin/SecurityConfHandlerTest.java
 ##########
 @@ -55,19 +56,19 @@ public void testEdit() throws Exception {
       basicAuth.init((Map<String, Object>) 
securityCfg.getData().get("authentication"));
       assertTrue(basicAuth.authenticate("tom", "TomIsUberCool"));
 
-
       command = "{\n" +
           "'set-user': {'harry':'HarryIsCool'},\n" +
-          "'delete-user': ['tom','harry']\n" +
+          "'delete-user': ['tom']\n" +
           "}";
       o = new 
ContentStreamBase.ByteArrayStream(command.getBytes(StandardCharsets.UTF_8), "");
       req.setContentStreams(Collections.singletonList(o));
       handler.handleRequestBody(req, new SolrQueryResponse());
       securityCfg = handler.m.get("/security.json");
+
       assertEquals(3, securityCfg.getVersion());
       Map result = (Map) securityCfg.getData().get("authentication");
       result = (Map) result.get("credentials");
-      assertTrue(result.isEmpty());
+      assertEquals(1,result.size());
 
 Review comment:
   previously all users were deleted but that simply isn't possible anymore if 
authentication is enabled. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to