Skip to content

Commit 5d7569f

Browse files
dblocknathaliellenaa
authored andcommitted
Added tests for /_validate/query. (opensearch-project#739)
* Added tests for /_validate/query. Signed-off-by: dblock <[email protected]> * Added retry for opensearch-project#738. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]>
1 parent 0f2c91f commit 5d7569f

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$schema: ../../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test validating queries.
4+
chapters:
5+
- synopsis: Validate a query.
6+
path: /_validate/query
7+
method:
8+
- GET
9+
- POST
10+
request:
11+
payload:
12+
query:
13+
match_all: {}
14+
response:
15+
status: 200
16+
payload:
17+
valid: true
+5-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$schema: ../../../../json_schemas/test_story.schema.yaml
22

3-
description: Test validating queries for a specific index using both GET and POST methods.
3+
description: Test validating queries for a specific index.
44
epilogues:
55
- path: /movies
66
method: DELETE
@@ -18,9 +18,11 @@ prologues:
1818
- {create: {_index: movies, _id: movie2}}
1919
- {director: Nicolas Winding Refn, title: Drive, year: 1960}
2020
chapters:
21-
- synopsis: Validate a match query (GET).
21+
- synopsis: Validate a match query.
2222
path: /{index}/_validate/query
23-
method: GET
23+
method:
24+
- GET
25+
- POST
2426
parameters:
2527
index: movies
2628
request:
@@ -32,18 +34,3 @@ chapters:
3234
status: 200
3335
payload:
3436
valid: true
35-
36-
- synopsis: Validate a match query (POST).
37-
path: /{index}/_validate/query
38-
method: POST
39-
parameters:
40-
index: movies
41-
request:
42-
payload:
43-
query:
44-
match:
45-
title: Drive
46-
response:
47-
status: 200
48-
payload:
49-
valid: true

tests/plugins/security/api/nodesdn.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ chapters:
1515
payload:
1616
nodes_dn:
1717
- CN=cluster.example.com
18+
retry:
19+
count: 3
1820
response:
1921
status: 201
2022
payload:

0 commit comments

Comments
 (0)