1 --- 2 setup: 3 4 - do: 5 snapshot.create_repository: 6 repository: test_repo_create_1 7 body: 8 type: fs 9 settings: 10 location: "test_repo_create_1_loc" 11 12 - do: 13 indices.create: 14 index: test_index 15 body: 16 settings: 17 number_of_shards: 1 18 number_of_replicas: 1 19 20 --- 21 "Create a snapshot": 22 23 - do: 24 snapshot.create: 25 repository: test_repo_create_1 26 snapshot: test_snapshot 27 wait_for_completion: true 28 29 - match: { snapshot.snapshot: test_snapshot } 30 - match: { snapshot.state : SUCCESS } 31 - match: { snapshot.shards.successful: 1 } 32 - match: { snapshot.shards.failed : 0 } 33 34 - do: 35 snapshot.delete: 36 repository: test_repo_create_1 37 snapshot: test_snapshot 38 39 - match: { acknowledged: true } 40 41 --- 42 "Create a snapshot for missing index": 43 - skip: 44 version: " - 6.0.0" 45 reason: ignore_unavailable default is false in 6.0.0 46 47 - do: 48 catch: missing 49 snapshot.create: 50 repository: test_repo_create_1 51 snapshot: test_snapshot_1 52 wait_for_completion: true 53 body: | 54 { "indices": "missing_1" } 55 56 - do: 57 snapshot.create: 58 repository: test_repo_create_1 59 snapshot: test_snapshot_2 60 wait_for_completion: true 61 body: | 62 { "indices": "missing_2", "ignore_unavailable": true } 63 64 - match: { snapshot.snapshot: test_snapshot_2 } 65 - match: { snapshot.state : SUCCESS } 66 - match: { snapshot.shards.successful: 0 } 67 - match: { snapshot.shards.failed : 0 } 68 69 - do: 70 snapshot.delete: 71 repository: test_repo_create_1 72 snapshot: test_snapshot_2 73 74 - match: { acknowledged: true }