Skip to content

Commit f5c21bf

Browse files
committed
JSON format
Signed-off-by: Nils Bandener <[email protected]>
1 parent 6b66b35 commit f5c21bf

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/integrationTest/java/org/opensearch/security/privileges/int_tests/IndexAuthorizationReadOnlyIntTests.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,18 @@ public void search_nonExisting_indexPattern() throws Exception {
868868
@Test
869869
public void search_termsAggregation_index() throws Exception {
870870
try (TestRestClient restClient = cluster.getRestClient(user)) {
871-
TestRestClient.HttpResponse httpResponse = restClient.postJson(
872-
"/_search",
873-
"{\"size\":0,\"aggs\":{\"indices\":{\"terms\":{\"field\":\"_index\",\"size\":1000}}}}"
874-
);
871+
TestRestClient.HttpResponse httpResponse = restClient.postJson("/_search", """
872+
{
873+
"size": 0,
874+
"aggs": {
875+
"indices": {
876+
"terms": {
877+
"field": "_index",
878+
"size": 1000
879+
}
880+
}
881+
}
882+
}""");
875883

876884
assertThat(
877885
httpResponse,
@@ -1516,7 +1524,7 @@ public void resolve_indexPattern() throws Exception {
15161524
public void field_caps_all() throws Exception {
15171525
try (TestRestClient restClient = cluster.getRestClient(user)) {
15181526
if (user == SUPER_UNLIMITED_USER || user == UNLIMITED_USER) {
1519-
TestRestClient.HttpResponse httpResponse = restClient.get("/_field_caps?fields=*");
1527+
TestRestClient.HttpResponse httpResponse = restClient.get("_field_caps?fields=*");
15201528
assertThat(
15211529
httpResponse,
15221530
containsExactly(index_a1, index_a2, index_a3, index_b1, index_b2, index_b3, index_c1).at("indices")
@@ -1525,7 +1533,7 @@ public void field_caps_all() throws Exception {
15251533
);
15261534

15271535
} else {
1528-
TestRestClient.HttpResponse httpResponse = restClient.get("/_field_caps?fields=*");
1536+
TestRestClient.HttpResponse httpResponse = restClient.get("_field_caps?fields=*");
15291537
assertThat(
15301538
httpResponse,
15311539
containsExactly(ALL_INDICES).at("indices")

0 commit comments

Comments
 (0)