From f4da918b09896b9568498f05662a55e3092974ac Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 27 Oct 2016 22:34:35 +0200 Subject: [PATCH] [TEST] Pass _analyze API params in the body rather than as params. Parameters are not supported anymore Original commit: elastic/x-pack-elasticsearch@e04d425a89cca059865f13fbfce7fca70abb6275 --- .../org/elasticsearch/integration/IndexPrivilegeTests.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java b/elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java index ca3558dc5a5..ef6aa6caaad 100644 --- a/elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java +++ b/elasticsearch/src/test/java/org/elasticsearch/integration/IndexPrivilegeTests.java @@ -456,8 +456,7 @@ public class IndexPrivilegeTests extends AbstractPrivilegeTestCase { // wait until index ready, but as admin client().admin().cluster().prepareHealth(index).setWaitForGreenStatus().get(); assertAccessIsAllowed(user, "POST", "/" + index + "/_refresh"); - Map analyzeParams = singletonMap("text", "test"); - assertAccessIsAllowed(user, "GET", "/" + index + "/_analyze", null, analyzeParams); + assertAccessIsAllowed(user, "GET", "/" + index + "/_analyze", "{ \"text\" : \"test\" }"); assertAccessIsAllowed(user, "POST", "/" + index + "/_flush"); assertAccessIsAllowed(user, "POST", "/" + index + "/_forcemerge"); assertAccessIsAllowed(user, "POST", "/" + index + "/_upgrade", null); @@ -473,8 +472,7 @@ public class IndexPrivilegeTests extends AbstractPrivilegeTestCase { assertAccessIsDenied(user, "DELETE", "/" + index); assertUserIsDenied(user, "create_index", index); assertAccessIsDenied(user, "POST", "/" + index + "/_refresh"); - Map analyzeParams = singletonMap("text", "test"); - assertAccessIsDenied(user, "GET", "/" + index + "/_analyze", null, analyzeParams); + assertAccessIsDenied(user, "GET", "/" + index + "/_analyze", "{ \"text\" : \"test\" }"); assertAccessIsDenied(user, "POST", "/" + index + "/_flush"); assertAccessIsDenied(user, "POST", "/" + index + "/_forcemerge"); assertAccessIsDenied(user, "POST", "/" + index + "/_upgrade", null);