From c21f94a5749725fafe59e8ab3ba9b01db1f50f5a Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Fri, 27 Jun 2025 17:16:26 -0500 Subject: [PATCH] Avoid using data stream mappings if feature flag is disabled --- .../action/datastreams/GetDataStreamActionTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/action/datastreams/GetDataStreamActionTests.java b/server/src/test/java/org/elasticsearch/action/datastreams/GetDataStreamActionTests.java index c90669650a949..2daa37eb84ae6 100644 --- a/server/src/test/java/org/elasticsearch/action/datastreams/GetDataStreamActionTests.java +++ b/server/src/test/java/org/elasticsearch/action/datastreams/GetDataStreamActionTests.java @@ -66,8 +66,10 @@ public void testDataStreamInfoToXContent() throws IOException { assertThat(lifecycleResult.get("retention_determined_by"), equalTo("max_global_retention")); Map> settingsMap = (Map>) resultMap.get("settings"); assertThat(Settings.builder().loadFromMap(settingsMap).build(), equalTo(dataStreamInfo.getDataStream().getSettings())); - Map mappingsMap = (Map) resultMap.get("mappings"); - assertThat(new CompressedXContent(mappingsMap), equalTo(dataStreamInfo.getDataStream().getMappings())); + if (DataStream.LOGS_STREAM_FEATURE_FLAG) { + Map mappingsMap = (Map) resultMap.get("mappings"); + assertThat(new CompressedXContent(mappingsMap), equalTo(dataStreamInfo.getDataStream().getMappings())); + } } }