From 98d20b5f2984b9625a1757dd654b419cac69ef01 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Tue, 4 May 2021 15:54:05 +0200 Subject: [PATCH] Adjust SourceOnlySnapshotIT This test started to fail after #72616 got merged. In this last change we made sure that indices with at least 1 empty doc also has mappings. Since source only repository stores the mappings in `_meta` at restore time we need to adapt the test to not fail. --- .../java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java b/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java index 06a9b922c763f..6ea58bed120b8 100644 --- a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java +++ b/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java @@ -198,7 +198,7 @@ private void assertMappings(String sourceIdx, boolean requireRouting, boolean us "}}}}}", mapping.source().string()); } else { assertEquals("{\"_doc\":{\"enabled\":false," + - "\"_meta\":{\"_doc\":{\"properties\":{\"field1\":{\"type\":\"text\"," + + "\"_meta\":{\"_doc\":{\"_meta\":{},\"properties\":{\"field1\":{\"type\":\"text\"," + "\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}}" + nested + "}}}}}", mapping.source().string()); }