Skip to content

Commit e0ee6ab

Browse files
committed
Add yaml test for tsdb index sorting defaults
1 parent c6b6c12 commit e0ee6ab

File tree

1 file changed

+26
-0
lines changed
  • rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb

1 file changed

+26
-0
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/10_settings.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,29 @@ check time_series empty time bound value:
576576
"@timestamp": "2021-09-26T03:09:52.123456789Z",
577577
"metricset": "pod"
578578
}
579+
580+
---
581+
default sort field:
582+
- requires:
583+
cluster_features: [ "mapper.provide_index_sort_setting_defaults" ]
584+
reason: "testing index sort setting defaults"
585+
586+
- do:
587+
indices.create:
588+
index: test_index
589+
body:
590+
settings:
591+
index:
592+
mode: time_series
593+
routing_path: foo
594+
time_series:
595+
start_time: 2021-04-28T00:00:00Z
596+
end_time: 2021-04-29T00:00:00Z
597+
598+
- do:
599+
indices.get_settings:
600+
index: test_index
601+
include_defaults: true
602+
- match: { .test_index.settings.index.mode: time_series }
603+
- match: { .test_index.defaults.index.sort.field: [ "_tsid", "@timestamp" ] }
604+
- match: { .test_index.defaults.index.sort.order: [ "asc", "desc" ] }

0 commit comments

Comments
 (0)