Skip to content

Commit c0ed08f

Browse files
committed
Fix TSDBPassthroughIndexingIT
1 parent 8ed8f6f commit c0ed08f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/TSDBIndexingIT.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,14 @@ public void testTsdbTemplatesNoKeywordFieldType() throws Exception {
327327
ComposableIndexTemplate.builder()
328328
.indexPatterns(List.of("k8s*"))
329329
.template(
330-
new Template(Settings.builder().put("index.mode", "time_series").build(), new CompressedXContent(mappingTemplate), null)
330+
new Template(
331+
Settings.builder()
332+
.put("index.mode", "time_series")
333+
.put("index.routing_path", randomBoolean() ? "metricset" : null)
334+
.build(),
335+
new CompressedXContent(mappingTemplate),
336+
null
337+
)
331338
)
332339
.dataStreamTemplate(new ComposableIndexTemplate.DataStreamTemplate(false, false))
333340
.build()

modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/TSDBPassthroughIndexingIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ public void testIndexingGettingAndSearching() throws Exception {
184184

185185
// validate index:
186186
var getIndexResponse = client().admin().indices().getIndex(new GetIndexRequest(TEST_REQUEST_TIMEOUT).indices(index)).actionGet();
187-
assertThat(getIndexResponse.getSettings().get(index).hasValue("index.routing_path"), equalTo(false));
187+
assertThat(getIndexResponse.getSettings().get(index).get("index.routing_path"), equalTo("[attributes.*]"));
188+
assertThat(getIndexResponse.getSettings().get(index).get("index.dimensions"), equalTo("[attributes.*]"));
188189
// validate mapping
189190
var mapping = getIndexResponse.mappings().get(index).getSourceAsMap();
190191
assertMap(

0 commit comments

Comments
 (0)