Skip to content

Commit ed07473

Browse files
committed
getting rid of code to remove _doc from effective mappings
1 parent b1daeea commit ed07473

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

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

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,32 +55,38 @@ public void testGetAndUpdateMappings() throws IOException {
5555
createDataStream(dataStreamName);
5656

5757
Map<String, Object> originalMappings = Map.of(
58-
"dynamic",
59-
"strict",
60-
"_data_stream_timestamp",
61-
Map.of("enabled", true),
62-
"properties",
63-
Map.of("@timestamp", Map.of("type", "date"), "foo1", Map.of("type", "text"), "foo2", Map.of("type", "text"))
58+
"_doc",
59+
Map.of(
60+
"dynamic",
61+
"strict",
62+
"_data_stream_timestamp",
63+
Map.of("enabled", true),
64+
"properties",
65+
Map.of("@timestamp", Map.of("type", "date"), "foo1", Map.of("type", "text"), "foo2", Map.of("type", "text"))
66+
)
6467
);
6568
Map<String, Object> mappingOverrides = Map.of(
6669
"properties",
6770
Map.of("foo2", Map.of("type", "keyword"), "foo3", Map.of("type", "text"))
6871
);
6972
Map<String, Object> expectedEffectiveMappings = Map.of(
70-
"dynamic",
71-
"strict",
72-
"_data_stream_timestamp",
73-
Map.of("enabled", true),
74-
"properties",
73+
"_doc",
7574
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")
75+
"dynamic",
76+
"strict",
77+
"_data_stream_timestamp",
78+
Map.of("enabled", true),
79+
"properties",
80+
Map.of(
81+
"@timestamp",
82+
Map.of("type", "date"),
83+
"foo1",
84+
Map.of("type", "text"),
85+
"foo2",
86+
Map.of("type", "keyword"),
87+
"foo3",
88+
Map.of("type", "text")
89+
)
8490
)
8591
);
8692
assertExpectedMappings(dataStreamName, Map.of(), originalMappings);

0 commit comments

Comments
 (0)