Skip to content

Commit

Permalink
add a rest test
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhatn committed Nov 23, 2017
1 parent 4405767 commit 04e61fb
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,37 @@
- match: { unassigned_shards: 0 }
- gte: { number_of_pending_tasks: 0 }

---
"cluster health basic test, one index with wait for no initializing shards":
- skip:
version: " - 6.99.99"
reason: "wait_for_no_initializing_shard is introduced in 7.0.0"

- do:
indices.create:
index: test_index
wait_for_active_shards: 0
body:
settings:
index:
number_of_shards: 50
number_of_replicas: 0

- do:
cluster.health:
wait_for_no_initializing_shards: true

- is_true: cluster_name
- is_false: timed_out
- gte: { number_of_nodes: 1 }
- gte: { number_of_data_nodes: 1 }
- match: { active_primary_shards: 50}
- gt: { active_shards: 0 }
- gte: { relocating_shards: 0 }
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- gte: { number_of_pending_tasks: 0 }

---
"cluster health levels":
- do:
Expand Down

0 comments on commit 04e61fb

Please sign in to comment.