2013-07-24 10:05:21 -04:00
|
|
|
---
|
2015-01-08 10:24:06 -05:00
|
|
|
"no segments test":
|
2013-07-24 10:05:21 -04:00
|
|
|
- do:
|
2013-12-11 18:30:12 -05:00
|
|
|
indices.segments:
|
|
|
|
allow_no_indices: true
|
2015-01-08 10:24:06 -05:00
|
|
|
|
|
|
|
- match: { _shards.total: 0}
|
|
|
|
- match: { indices: {}}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: missing
|
|
|
|
indices.segments:
|
|
|
|
allow_no_indices: false
|
|
|
|
|
|
|
|
---
|
|
|
|
"basic segments test":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: index1
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_shards: "1"
|
|
|
|
number_of_replicas: "0"
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: index1
|
|
|
|
type: type
|
|
|
|
body: { foo: bar }
|
|
|
|
refresh: true
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: green
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.segments:
|
|
|
|
index: index1
|
|
|
|
|
|
|
|
- match: { _shards.total: 1}
|
|
|
|
- match: { indices.index1.shards.0.0.routing.primary: true}
|
|
|
|
- match: { indices.index1.shards.0.0.segments._0.num_docs: 1}
|
|
|
|
|
|
|
|
---
|
|
|
|
"closed segments test":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: index1
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_shards: "1"
|
|
|
|
number_of_replicas: "0"
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: index1
|
|
|
|
type: type
|
|
|
|
body: { foo: bar }
|
|
|
|
refresh: true
|
|
|
|
|
|
|
|
- do:
|
2015-02-12 11:34:53 -05:00
|
|
|
indices.close:
|
|
|
|
index: index1
|
2015-01-08 10:24:06 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: forbidden
|
|
|
|
indices.segments:
|
|
|
|
index: index1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.segments:
|
|
|
|
index: index1
|
|
|
|
ignore_unavailable: true
|
|
|
|
|
|
|
|
- match: { _shards.total: 0}
|