diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.segments/10_basic.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.segments/10_basic.yml index 58d5435fec639..0235d5219e47e 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.segments/10_basic.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.segments/10_basic.yml @@ -40,6 +40,50 @@ - match: { indices.index1.shards.0.0.routing.primary: true} - match: { indices.index1.shards.0.0.segments._0.num_docs: 1} +--- +"segments from multiple indices": + + - do: + indices.create: + index: index1 + body: + settings: + number_of_shards: "1" + number_of_replicas: "0" + + - do: + indices.create: + index: index2 + body: + settings: + number_of_shards: "1" + number_of_replicas: "0" + + - do: + index: + index: index1 + body: { foo: bar } + refresh: true + + - do: + index: + index: index2 + body: { foo: bar } + refresh: true + + - do: + cluster.health: + wait_for_status: green + + - do: + indices.segments: {} + + - gte: { _shards.total: 2 } + - match: { indices.index1.shards.0.0.routing.primary: true} + - match: { indices.index1.shards.0.0.segments._0.num_docs: 1} + - match: { indices.index2.shards.0.0.routing.primary: true} + - match: { indices.index2.shards.0.0.segments._0.num_docs: 1} + --- "closed segments test": - skip: