|
39 | 39 | body: { "index": "test", "shard": 2147483647, "primary": true } |
40 | 40 |
|
41 | 41 | --- |
42 | | -"cluster shard allocation explanation test with long shard value": |
| 42 | +"cluster shard allocation explanation test with an invalid, string shard parameter in the body": |
43 | 43 | - do: |
44 | 44 | indices.create: |
45 | 45 | index: test |
|
49 | 49 | - do: |
50 | 50 | catch: /x_content_parse_exception/ |
51 | 51 | cluster.allocation_explain: |
52 | | - body: { "index": "test", "shard": 214748364777, "primary": true } |
| 52 | + body: { "index": "test", "shard": "wrong", "primary": true } |
53 | 53 |
|
54 | 54 | --- |
55 | | -"cluster shard allocation explanation test with float shard value": |
| 55 | +"cluster shard allocation explanation test with a valid, string shard parameter in the body": |
56 | 56 | - do: |
57 | 57 | indices.create: |
58 | 58 | index: test |
59 | | - body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } |
60 | 59 |
|
61 | 60 | - match: { acknowledged: true } |
62 | 61 |
|
63 | 62 | - do: |
64 | 63 | cluster.allocation_explain: |
65 | | - body: { "index": "test", "shard": 1.0, "primary": true } |
| 64 | + body: { "index": "test", "shard": "0", "primary": true } |
66 | 65 |
|
67 | 66 | - match: { current_state: "started" } |
68 | 67 | - is_true: current_node.id |
69 | 68 | - match: { index: "test" } |
70 | | - - match: { shard: 1 } |
| 69 | + - match: { shard: 0 } |
71 | 70 | - match: { primary: true } |
72 | 71 | - is_true: can_remain_on_current_node |
73 | 72 | - is_true: can_rebalance_cluster |
74 | 73 | - is_true: can_rebalance_to_other_node |
75 | 74 | - is_true: rebalance_explanation |
76 | 75 |
|
| 76 | +--- |
| 77 | +"cluster shard allocation explanation test with long shard value": |
| 78 | + - do: |
| 79 | + indices.create: |
| 80 | + index: test |
| 81 | + |
| 82 | + - match: { acknowledged: true } |
| 83 | + |
| 84 | + - do: |
| 85 | + catch: /x_content_parse_exception/ |
| 86 | + cluster.allocation_explain: |
| 87 | + body: { "index": "test", "shard": 214748364777, "primary": true } |
| 88 | + |
| 89 | +--- |
| 90 | +"cluster shard allocation explanation test with float shard value": |
| 91 | + - do: |
| 92 | + indices.create: |
| 93 | + index: test |
| 94 | + body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } |
| 95 | + |
| 96 | + - match: { acknowledged: true } |
| 97 | + |
| 98 | + - do: |
| 99 | + catch: /illegal_argument_exception/ |
| 100 | + cluster.allocation_explain: |
| 101 | + body: { "index": "test", "shard": 1.0, "primary": true } |
| 102 | + |
| 103 | +--- |
| 104 | +"cluster shard allocation explanation test with stringified float shard value": |
| 105 | + - do: |
| 106 | + indices.create: |
| 107 | + index: test |
| 108 | + body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } |
| 109 | + |
| 110 | + - match: { acknowledged: true } |
| 111 | + |
| 112 | + - do: |
| 113 | + catch: /illegal_argument_exception/ |
| 114 | + cluster.allocation_explain: |
| 115 | + body: { "index": "test", "shard": "1.0", "primary": true } |
| 116 | + |
| 117 | + |
77 | 118 | --- |
78 | 119 | "cluster shard allocation explanation test with double shard value": |
79 | 120 | - do: |
|
84 | 125 | - match: { acknowledged: true } |
85 | 126 |
|
86 | 127 | - do: |
| 128 | + catch: /x_content_parse_exception/ |
87 | 129 | cluster.allocation_explain: |
88 | 130 | body: { "index": "test", "shard": 1.1234567891234567, "primary": true } |
89 | 131 |
|
90 | | - - match: { current_state: "started" } |
91 | | - - is_true: current_node.id |
92 | | - - match: { index: "test" } |
93 | | - - match: { shard: 1 } |
94 | | - - match: { primary: true } |
95 | | - - is_true: can_remain_on_current_node |
96 | | - - is_true: can_rebalance_cluster |
97 | | - - is_true: can_rebalance_to_other_node |
98 | | - - is_true: rebalance_explanation |
| 132 | +--- |
| 133 | +"cluster shard allocation explanation test with stringified double shard value": |
| 134 | + - do: |
| 135 | + indices.create: |
| 136 | + index: test |
| 137 | + body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } |
| 138 | + |
| 139 | + - match: { acknowledged: true } |
| 140 | + |
| 141 | + - do: |
| 142 | + catch: /x_content_parse_exception/ |
| 143 | + cluster.allocation_explain: |
| 144 | + body: { "index": "test", "shard": "1.1234567891234567", "primary": true } |
| 145 | + |
99 | 146 |
|
100 | 147 | --- |
101 | 148 | "cluster shard allocation explanation test with three valid body parameters": |
|
0 commit comments