mirror of https://github.com/apache/lucene.git
SOLR-13637: BasicAuthIntegrationTest failures fixed
This commit is contained in:
parent
c0da27173c
commit
100c160017
|
@ -249,8 +249,9 @@ public class ApiBag {
|
|||
|
||||
@Override
|
||||
public Name getPermissionName(AuthorizationContext ctx) {
|
||||
if (rh instanceof PermissionNameProvider) {
|
||||
return ((PermissionNameProvider) rh).getPermissionName(ctx);
|
||||
SolrRequestHandler handler = rh.get();
|
||||
if (handler instanceof PermissionNameProvider) {
|
||||
return ((PermissionNameProvider) handler).getPermissionName(ctx);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -135,7 +135,9 @@ public class BasicAuthIntegrationTest extends SolrCloudAuthTestCase {
|
|||
|
||||
final SolrRequest genericReq;
|
||||
if (isUseV2Api) {
|
||||
genericReq = new V2Request.Builder("/cluster/security/authentication").withMethod(SolrRequest.METHOD.POST).build();
|
||||
genericReq = new V2Request.Builder("/cluster/security/authentication")
|
||||
.withPayload(command)
|
||||
.withMethod(SolrRequest.METHOD.POST).build();
|
||||
} else {
|
||||
genericReq = new GenericSolrRequest(SolrRequest.METHOD.POST, authcPrefix, new ModifiableSolrParams());
|
||||
((GenericSolrRequest)genericReq).setContentWriter(new StringPayloadContentWriter(command, CommonParams.JSON_MIME));
|
||||
|
|
Loading…
Reference in New Issue