add ILM rolling upgrade tests (#32828)

This commit is contained in:
Tal Levy 2018-10-26 15:40:26 -07:00 committed by GitHub
parent 8ce31f6343
commit 5c88356ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 101 additions and 0 deletions

View File

@ -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

View File

@ -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" }

View File

@ -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"