Skip to content

Commit

Permalink
Add test to validate getTime and time fields in _stats API response
Browse files Browse the repository at this point in the history
getTime and time fields are verified to be included in the _stats API response and correctly aligned.

Signed-off-by: hye-on <ain0103@naver.com>
  • Loading branch information
hye-on committed Jan 15, 2025
1 parent b18d415 commit 98c8a62
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
setup:
- do:
indices.create:
index: test1
body:
settings:
number_of_shards: 1
number_of_replicas: 0
wait_for_active_shards: all

- do:
index:
index: test1
id: 1
body: { "foo": "bar" }

- do:
indices.refresh:
index: test1

---
"Test _stats API includes both time and getTime metrics with human filter":
- do:
indices.stats:
metric: [ get ]
human: true

- is_true: _all.primaries.get.time
- is_true: _all.primaries.get.getTime
- match: { _all.primaries.get.time: "0s" }
- match: { _all.primaries.get.getTime: "0s" }

0 comments on commit 98c8a62

Please sign in to comment.