OpenSearch/rest-api-spec/test/indices.stats/12_level.yaml

76 lines
1.6 KiB
YAML
Raw Normal View History

---
setup:
- do:
index:
index: test1
type: bar
id: 1
body: { "foo": "bar" }
- do:
index:
index: test2
type: baz
id: 1
body: { "foo": "baz" }
- do:
cluster.health:
wait_for_status: yellow
---
"Level - blank":
- do:
indices.stats: {}
- is_true: _all.total.docs
- is_true: _all.total.docs
- is_true: indices.test1.total.docs
- is_true: indices.test1.total.docs
- is_false: indices.test1.shards
- is_true: indices.test2.total.docs
- is_true: indices.test2.total.docs
- is_false: indices.test2.shards
---
"Level - indices":
- do:
indices.stats: { level: indices }
- is_true: _all.total.docs
- is_true: _all.total.docs
- is_true: indices.test1.total.docs
- is_true: indices.test1.total.docs
- is_false: indices.test1.shards
- is_true: indices.test2.total.docs
- is_true: indices.test2.total.docs
- is_false: indices.test2.shards
---
"Level - cluster":
- do:
indices.stats: { level: cluster }
- is_true: _all.total.docs
- is_true: _all.total.docs
- is_false: indices
---
"Level - shards":
- do:
indices.stats: { level: shards }
- is_true: _all.total.docs
- is_true: _all.total.docs
- is_true: indices.test1.total.docs
- is_true: indices.test1.total.docs
- is_true: indices.test1.shards
- is_true: indices.test2.total.docs
- is_true: indices.test2.total.docs
- is_true: indices.test2.shards
- is_true: indices.test1.shards.0.0.commit.id
- is_true: indices.test2.shards.0.0.commit.id