From 4014ffec4bcf08b53e8a593ed1016ef928f2c30c Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 16 Dec 2024 17:35:47 -0500 Subject: [PATCH 1/2] Added tests for /_validate/query. Signed-off-by: dblock --- tests/default/_core/validate/query.yaml | 17 +++++++++++++++++ tests/default/indices/validate/query.yaml | 23 +++++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 tests/default/_core/validate/query.yaml diff --git a/tests/default/_core/validate/query.yaml b/tests/default/_core/validate/query.yaml new file mode 100644 index 000000000..1c5849c01 --- /dev/null +++ b/tests/default/_core/validate/query.yaml @@ -0,0 +1,17 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test validating queries. +chapters: + - synopsis: Validate a query. + path: /_validate/query + method: + - GET + - POST + request: + payload: + query: + match_all: {} + response: + status: 200 + payload: + valid: true diff --git a/tests/default/indices/validate/query.yaml b/tests/default/indices/validate/query.yaml index 264579058..55ced1fb8 100644 --- a/tests/default/indices/validate/query.yaml +++ b/tests/default/indices/validate/query.yaml @@ -1,6 +1,6 @@ $schema: ../../../../json_schemas/test_story.schema.yaml -description: Test validating queries for a specific index using both GET and POST methods. +description: Test validating queries for a specific index. epilogues: - path: /movies method: DELETE @@ -18,9 +18,11 @@ prologues: - {create: {_index: movies, _id: movie2}} - {director: Nicolas Winding Refn, title: Drive, year: 1960} chapters: - - synopsis: Validate a match query (GET). + - synopsis: Validate a match query. path: /{index}/_validate/query - method: GET + method: + - GET + - POST parameters: index: movies request: @@ -32,18 +34,3 @@ chapters: status: 200 payload: valid: true - - - synopsis: Validate a match query (POST). - path: /{index}/_validate/query - method: POST - parameters: - index: movies - request: - payload: - query: - match: - title: Drive - response: - status: 200 - payload: - valid: true \ No newline at end of file From a53c487362f6fb7084e352d643ef4bbdd6acd510 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 17 Dec 2024 09:17:54 -0500 Subject: [PATCH 2/2] Added retry for https://github.com/opensearch-project/opensearch-api-specification/issues/738. Signed-off-by: dblock --- tests/plugins/security/api/nodesdn.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/plugins/security/api/nodesdn.yaml b/tests/plugins/security/api/nodesdn.yaml index 176a748c9..6a4611ef3 100644 --- a/tests/plugins/security/api/nodesdn.yaml +++ b/tests/plugins/security/api/nodesdn.yaml @@ -15,6 +15,8 @@ chapters: payload: nodes_dn: - CN=cluster.example.com + retry: + count: 3 response: status: 201 payload: