forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix delete index template failed when the index template matches a da…
…ta stream but is unused (opensearch-project#15080) * Fix delete not-using index template failed when the index pattern matches a data stream Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * Fix version check Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
- Loading branch information
1 parent
47171f8
commit a9d09aa
Showing
4 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
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
52 changes: 52 additions & 0 deletions
52
...api-spec/src/main/resources/rest-api-spec/test/indices.delete_index_template/10_basic.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,52 @@ | ||
setup: | ||
- do: | ||
indices.put_index_template: | ||
name: test_template_1 | ||
body: | ||
index_patterns: test-* | ||
template: | ||
settings: | ||
number_of_shards: 1 | ||
number_of_replicas: 0 | ||
"priority": 50 | ||
|
||
- do: | ||
indices.put_index_template: | ||
name: test_template_2 | ||
body: | ||
index_patterns: test-* | ||
data_stream: {} | ||
template: | ||
settings: | ||
number_of_shards: 1 | ||
number_of_replicas: 0 | ||
"priority": 51 | ||
|
||
--- | ||
teardown: | ||
- do: | ||
indices.delete_data_stream: | ||
name: test-1 | ||
ignore: 404 | ||
- do: | ||
indices.delete_index_template: | ||
name: test_template_1 | ||
ignore: 404 | ||
- do: | ||
indices.delete_index_template: | ||
name: test_template_2 | ||
ignore: 404 | ||
|
||
--- | ||
"Delete index template which is not used by data stream but index pattern matches": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "fixed in 3.0.0" | ||
|
||
- do: | ||
indices.create_data_stream: | ||
name: test-1 | ||
|
||
- do: | ||
indices.delete_index_template: | ||
name: test_template_1 |
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
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