Skip to content

Commit

Permalink
Create 50_remove_and_add_same_alias.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Amol Kapoor <theahura@gmail.com>
  • Loading branch information
theahura authored Jul 1, 2024
1 parent 6267e94 commit ade8260
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"Ensure update_aliases actions are done sequentially when operating on the same alias"
setup:
- do:
indices.create:
index: test_index
body:
settings:
number_of_shards: 1
number_of_replicas: 0

- do:
indices.update_aliases:
body:
actions:
- add:
index: test_index
alias: alias1

---
- do:
indices.update_aliases:
body:
actions:
- remove:
index: test_index
alias: alias1
- add:
index: test_index
alias: alias1

- do:
indices.get_alias:
name: alias1
- match: { test_index.aliases.alias1: {} }

---
teardown:
- do:
indices.delete:
index: test_index

0 comments on commit ade8260

Please sign in to comment.