Skip to content

Commit 7415ce6

Browse files
committed
fixing TransportUpdateDataStreamMappingsActionIT
1 parent 1f76e32 commit 7415ce6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ public void testGetAndUpdateMappings() throws IOException {
5757
Map<String, Object> originalMappings = Map.of(
5858
"dynamic",
5959
"strict",
60+
"_data_stream_timestamp",
61+
Map.of("enabled", true),
6062
"properties",
61-
Map.of("foo1", Map.of("type", "text"), "foo2", Map.of("type", "text"))
63+
Map.of("@timestamp", Map.of("type", "date"), "foo1", Map.of("type", "text"), "foo2", Map.of("type", "text"))
6264
);
6365
Map<String, Object> mappingOverrides = Map.of(
6466
"properties",
@@ -67,8 +69,19 @@ public void testGetAndUpdateMappings() throws IOException {
6769
Map<String, Object> expectedEffectiveMappings = Map.of(
6870
"dynamic",
6971
"strict",
72+
"_data_stream_timestamp",
73+
Map.of("enabled", true),
7074
"properties",
71-
Map.of("foo1", Map.of("type", "text"), "foo2", Map.of("type", "keyword"), "foo3", Map.of("type", "text"))
75+
Map.of(
76+
"@timestamp",
77+
Map.of("type", "date"),
78+
"foo1",
79+
Map.of("type", "text"),
80+
"foo2",
81+
Map.of("type", "keyword"),
82+
"foo3",
83+
Map.of("type", "text")
84+
)
7285
);
7386
assertExpectedMappings(dataStreamName, Map.of(), originalMappings);
7487
updateMappings(dataStreamName, mappingOverrides, expectedEffectiveMappings, true);

0 commit comments

Comments
 (0)