Skip to content

Commit

Permalink
Fix RolesMappingApiTest.testRolesMappingApi
Browse files Browse the repository at this point in the history
Signed-off-by: cliu123 <[email protected]>
  • Loading branch information
cliu123 committed Jun 10, 2022
1 parent f409d9c commit ae036fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ protected String checkReadAccess(int status, String username, String password, S

}

protected String checkWriteAccess(int status, String username, String password, String indexName, String type,
protected String checkWriteAccess(int status, String username, String password, String indexName, String actionType,
int id) throws Exception {

boolean sendAdminCertificate = rh.sendAdminCertificate;
rh.sendAdminCertificate = false;
String action = indexName + "/" + type + "/" + id;
String action = indexName + "/" + actionType + "/" + id;
String payload = "{\"value\" : \"true\"}";
HttpResponse response = rh.executePutRequest(action, payload,
encodeBasicHeader(username, password));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ private void checkAllSfAllowed() throws Exception {
rh.sendAdminCertificate = false;
checkReadAccess(HttpStatus.SC_OK, "picard", "picard", "sf", "_doc", 1);
checkWriteAccess(HttpStatus.SC_OK, "picard", "picard", "sf", "_doc", 1);
// ES7 only supports one doc type, so trying to create a second one leads to 400 BAD REQUEST
checkWriteAccess(HttpStatus.SC_BAD_REQUEST, "picard", "picard", "sf", "public", 1);
}

private void checkAllSfForbidden() throws Exception {
Expand Down

0 comments on commit ae036fc

Please sign in to comment.