-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
116 lines (101 loc) · 2.45 KB
/
10_basic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
requires:
stack: true
serverless: false
---
setup:
- do:
indices.create:
index: snapshot_index
body:
settings:
number_of_shards: 1
number_of_replicas: 0
---
teardown:
- do:
indices.delete:
index: snapshot_index
---
'Snapshot':
- do:
snapshot.create_repository:
repository: test_repo_1
body:
type: fs
settings:
location: "test_repo_1_loc"
- is_true: acknowledged
- do:
snapshot.create:
repository: test_repo_1
snapshot: test_snapshot
wait_for_completion: true
- match: { snapshot.snapshot: test_snapshot }
- match: { snapshot.state : SUCCESS }
- do:
snapshot.cleanup_repository:
repository: test_repo_1
- match: { results.deleted_bytes: 0 }
- match: { results.deleted_blobs: 0 }
- do:
snapshot.get:
repository: test_repo_1
snapshot: test_snapshot
- is_true: snapshots
- is_true: snapshots.0.failures
- do:
snapshot.status:
repository: test_repo_1
snapshot: test_snapshot
- is_true: snapshots
- match: { snapshots.0.snapshot: test_snapshot }
- match: { snapshots.0.state: SUCCESS }
- do:
indices.close:
index: snapshot_index
- do:
snapshot.restore:
repository: test_repo_1
snapshot: test_snapshot
wait_for_completion: true
body:
indices: snapshot_index
- do:
indices.recovery:
index: snapshot_index
- match: { snapshot_index.shards.0.type: SNAPSHOT }
- match: { snapshot_index.shards.0.stage: DONE }
- do:
snapshot.clone:
repository: test_repo_1
snapshot: test_snapshot
target_snapshot: target_snapshot_1
body:
"indices": snapshot_index
- match: { acknowledged: true }
- do:
snapshot.delete:
repository: test_repo_1
snapshot: target_snapshot_1
- match: { acknowledged: true }
- do:
snapshot.delete:
repository: test_repo_1
snapshot: test_snapshot
- match: { acknowledged: true }
- do:
snapshot.get_repository: {}
- is_true: test_repo_1
- do:
snapshot.repository_analyze:
repository: test_repo_1
- match: { repository: test_repo_1 }
- do:
snapshot.verify_repository:
repository: test_repo_1
- is_true: nodes
- do:
snapshot.delete_repository:
repository: test_repo_1
- is_true: acknowledged