-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ILM rolling upgrade tests (#32828)
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/70_ilm.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
49 changes: 49 additions & 0 deletions
49
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/70_ilm.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } |
21 changes: 21 additions & 0 deletions
21
x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/70_ilm.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |