diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml index 73a5eff613d3a..75d80ec1b28da 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml @@ -146,6 +146,15 @@ setup: indices.get: index: test + # Assert rollup index has been force merged + - do: + indices.segments: + index: rollup-test + + - match: { _shards.total: 1} + - match: { indices.rollup-test.shards.0.0.num_committed_segments: 1} + - match: { indices.rollup-test.shards.0.0.num_search_segments: 1} + --- "Rollup non-existing index": - skip: @@ -181,3 +190,67 @@ setup: { "fixed_interval": "1h" } + +--- +"Rollup not time_series index": + - skip: + version: " - 8.4.99" + reason: "rollup renamed to downsample in 8.5.0" + + - do: + indices.create: + index: normal-index + + - do: + catch: /Rollup requires setting \[index.mode=time_series\] for index \[normal-index\]/ + indices.downsample: + index: normal-index + target_index: rollup-test + body: > + { + "fixed_interval": "1h" + } + + +--- +"Rollup no metric index": + - skip: + version: " - 8.4.99" + reason: "rollup renamed to downsample in 8.5.0" + + - do: + indices.create: + index: no-metric-index + body: + settings: + number_of_shards: 1 + number_of_replicas: 0 + index: + mode: time_series + routing_path: [metricset] + time_series: + start_time: 2021-04-28T00:00:00Z + end_time: 2021-04-29T00:00:00Z + mappings: + properties: + "@timestamp": + type: date + metricset: + type: keyword + time_series_dimension: true + + - do: + indices.put_settings: + index: no-metric-index + body: + index.blocks.write: true + + - do: + catch: /Index \[no-metric-index\] does not contain any metric fields;/ + indices.downsample: + index: no-metric-index + target_index: rollup-test + body: > + { + "fixed_interval": "1h" + }