From 7203ceefd8761cdbfd9d4510cdda1ac968caf11d Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Mon, 23 Dec 2019 11:23:39 +0100 Subject: [PATCH] Fix Source Only Snapshot REST Test Failure (#50456) We are matching on the exact number of shards in this test, but may run into snapshotting more than the single index created in it due to auto-created indices like `.watcher`. Fixed by making the test only take a snapshot of the single index used by this test. Closes #50450 --- .../src/test/resources/rest-api-spec/test/snapshot/10_basic.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/snapshot/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/snapshot/10_basic.yml index 58ace059d04c1..e0ac436718595 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/snapshot/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/snapshot/10_basic.yml @@ -39,6 +39,8 @@ setup: repository: test_repo_restore_1 snapshot: test_snapshot wait_for_completion: true + body: | + { "indices": "test_index" } - match: { snapshot.snapshot: test_snapshot } - match: { snapshot.state : SUCCESS }