--- setup: - do: indices.create: index: test1 body: settings: number_of_shards: 5 number_of_replicas: 1 - do: indices.create: index: test2 body: settings: number_of_shards: 4 number_of_replicas: 1 - do: index: index: test1 type: bar id: 1 body: { "foo": "bar" } - do: index: index: test2 type: baz id: 1 body: { "foo": "baz" } --- "Index - blank": - do: indices.stats: {} - match: { _shards.total: 18 } - is_true: _all - is_true: indices.test1 - is_true: indices.test2 --- "Index - all": - do: indices.stats: { index: _all } - match: { _shards.total: 18 } - is_true: _all - is_true: indices.test1 - is_true: indices.test2 --- "Index - star": - do: indices.stats: { index: '*' } - match: { _shards.total: 18 } - is_true: _all - is_true: indices.test1 - is_true: indices.test2 --- "Index - star, no match": - do: indices.stats: { index: 'bla*' } - match: { _shards.total: 0 } - is_true: _all - is_false: indices.test1 - is_false: indices.test2 --- "Index - one index": - do: indices.stats: { index: 'test1' } - match: { _shards.total: 10 } - is_true: _all - is_true: indices.test1 - is_false: indices.test2 --- "Index - multi-index": - do: indices.stats: { index: [test1, test2] } - match: { _shards.total: 18 } - is_true: _all - is_true: indices.test1 - is_true: indices.test2 --- "Index - pattern": - do: indices.stats: { index: '*2' } - match: { _shards.total: 8 } - is_true: _all - is_false: indices.test1 - is_true: indices.test2