Skip to content

Commit

Permalink
Added tests for GET /_stats/{metric}. (#743)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Dec 17, 2024
1 parent 5149b66 commit a631452
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
25 changes: 25 additions & 0 deletions tests/default/_core/stats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test stats.
chapters:
- synopsis: Get global stats.
path: /_stats
method: GET
response:
status: 200
- synopsis: Get global stats with human fields.
path: /_stats
method: GET
parameters:
human: true
response:
status: 200
- synopsis: Get stats for a given metric.
path: /_stats/{metric}
method: GET
parameters:
metric: docs
expand_wildcards: all
forbid_closed_indices: false
groups: '*'
level: indices
12 changes: 0 additions & 12 deletions tests/default/indices/stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ epilogues:
method: DELETE
status: [200, 404]
chapters:
- synopsis: Get global stats.
path: /_stats
method: GET
response:
status: 200
- synopsis: Get global stats with human fields.
path: /_stats
method: GET
parameters:
human: true
response:
status: 200
- synopsis: Get stats for an index.
path: /{index}/_stats
method: GET
Expand Down

0 comments on commit a631452

Please sign in to comment.