Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for /_validate/query. #739

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/default/_core/validate/query.yaml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 5 additions & 18 deletions tests/default/indices/validate/query.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions tests/plugins/security/api/nodesdn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ chapters:
payload:
nodes_dn:
- CN=cluster.example.com
retry:
count: 3
response:
status: 201
payload:
Expand Down
Loading