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
|
@Override
|
||||||
public Name getPermissionName(AuthorizationContext ctx) {
|
public Name getPermissionName(AuthorizationContext ctx) {
|
||||||
if (rh instanceof PermissionNameProvider) {
|
SolrRequestHandler handler = rh.get();
|
||||||
return ((PermissionNameProvider) rh).getPermissionName(ctx);
|
if (handler instanceof PermissionNameProvider) {
|
||||||
|
return ((PermissionNameProvider) handler).getPermissionName(ctx);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,9 @@ public class BasicAuthIntegrationTest extends SolrCloudAuthTestCase {
|
||||||
|
|
||||||
final SolrRequest genericReq;
|
final SolrRequest genericReq;
|
||||||
if (isUseV2Api) {
|
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 {
|
} else {
|
||||||
genericReq = new GenericSolrRequest(SolrRequest.METHOD.POST, authcPrefix, new ModifiableSolrParams());
|
genericReq = new GenericSolrRequest(SolrRequest.METHOD.POST, authcPrefix, new ModifiableSolrParams());
|
||||||
((GenericSolrRequest)genericReq).setContentWriter(new StringPayloadContentWriter(command, CommonParams.JSON_MIME));
|
((GenericSolrRequest)genericReq).setContentWriter(new StringPayloadContentWriter(command, CommonParams.JSON_MIME));
|
||||||
|
|
Loading…
Reference in New Issue