Browse Source

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
Armin Braun 5 years ago
parent
commit
7203ceefd8

+ 2 - 0
x-pack/plugin/src/test/resources/rest-api-spec/test/snapshot/10_basic.yml

@@ -39,6 +39,8 @@ setup:
         repository: test_repo_restore_1
         repository: test_repo_restore_1
         snapshot: test_snapshot
         snapshot: test_snapshot
         wait_for_completion: true
         wait_for_completion: true
+        body: |
+          { "indices": "test_index" }
 
 
   - match: { snapshot.snapshot: test_snapshot }
   - match: { snapshot.snapshot: test_snapshot }
   - match: { snapshot.state : SUCCESS }
   - match: { snapshot.state : SUCCESS }