add ILM rolling upgrade tests (#32828)
This commit is contained in:
parent
8ce31f6343
commit
5c88356ad6
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
"Test Set Policy On Index":
|
||||
- do:
|
||||
ilm.get_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
- match: { my_lifecycle.policy.phases.warm.minimum_age: "1000d" }
|
||||
|
||||
- do:
|
||||
ilm.explain_lifecycle:
|
||||
index: "my_old_index"
|
||||
- is_true: indices.my_old_index.managed
|
||||
- match: { indices.my_old_index.index: "my_old_index" }
|
||||
- match: { indices.my_old_index.policy: "my_lifecycle" }
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: my_mixed_index
|
||||
body:
|
||||
settings:
|
||||
index.lifecycle.name: "my_lifecycle"
|
||||
|
||||
- do:
|
||||
ilm.explain_lifecycle:
|
||||
index: "my_mixed_index"
|
||||
- is_true: indices.my_mixed_index.managed
|
||||
- match: { indices.my_mixed_index.index: "my_mixed_index" }
|
||||
- match: { indices.my_mixed_index.policy: "my_lifecycle" }
|
||||
|
||||
- do:
|
||||
indices.delete:
|
||||
index: my_mixed_index
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
"Test Basic Policy Creation":
|
||||
- do:
|
||||
catch: missing
|
||||
ilm.get_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
|
||||
- do:
|
||||
catch: missing
|
||||
ilm.delete_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
|
||||
- do:
|
||||
ilm.put_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
body: |
|
||||
{
|
||||
"policy": {
|
||||
"phases": {
|
||||
"warm": {
|
||||
"minimum_age": "1000d",
|
||||
"actions": {
|
||||
"forcemerge": {
|
||||
"max_num_segments": 10000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- do:
|
||||
ilm.get_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
- match: { my_lifecycle.policy.phases.warm.minimum_age: "1000d" }
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: my_old_index
|
||||
body:
|
||||
settings:
|
||||
index.lifecycle.name: "my_lifecycle"
|
||||
|
||||
- do:
|
||||
ilm.explain_lifecycle:
|
||||
index: "my_old_index"
|
||||
- is_true: indices.my_old_index.managed
|
||||
- match: { indices.my_old_index.index: "my_old_index" }
|
||||
- match: { indices.my_old_index.policy: "my_lifecycle" }
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
"Test Lifecycle Still There And Indices Are Still Managed":
|
||||
- do:
|
||||
ilm.get_lifecycle:
|
||||
policy: "my_lifecycle"
|
||||
- match: { my_lifecycle.policy.phases.warm.minimum_age: "1000d" }
|
||||
|
||||
- do:
|
||||
ilm.explain_lifecycle:
|
||||
index: "my_old_index"
|
||||
- is_true: indices.my_old_index.managed
|
||||
- match: { indices.my_old_index.index: "my_old_index" }
|
||||
- match: { indices.my_old_index.policy: "my_lifecycle" }
|
||||
|
||||
- do:
|
||||
indices.delete:
|
||||
index: my_old_index
|
||||
|
||||
- do:
|
||||
ilm.delete_lifecycle:
|
||||
policy: "my_lifecycle"
|
Loading…
Reference in New Issue