diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml index 0835fe7de6af1..1f5e9d80b7702 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml @@ -102,19 +102,6 @@ cluster.allocation_explain: body: { "index": "test", "primary": true } ---- -"cluster shard allocation explanation test with numerical index parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": 0, "shard": 0, "primary": true } - --- "cluster shard allocation explanation test with incorrect index parameter in the body": - do: @@ -142,102 +129,6 @@ cluster.allocation_explain: body: { "index": "test", "shard": 2147483647, "primary": true } ---- -"cluster shard allocation explanation test with long shard value": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 214748364777, "primary": true } - ---- -"cluster shard allocation explanation test with float shard value": - - do: - indices.create: - index: test - body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": 1.0, "primary": true } - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 1 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with double shard value": - - do: - indices.create: - index: test - body: { "settings": { "index.number_of_shards": 2, "index.number_of_replicas": 0 } } - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": 1.1234567891234567, "primary": true } - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 1 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with an invalid, string shard parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": "wrong", "primary": true } - ---- -"cluster shard allocation explanation test with a valid, string shard parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": "0", "primary": true } - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - - - --- "cluster shard allocation explanation test with three valid body parameters": - do: @@ -260,210 +151,6 @@ - is_true: can_rebalance_to_other_node - is_true: rebalance_explanation ---- -"cluster shard allocation explanation test with numerical primary parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": 0 } - ---- -"cluster shard allocation explanation test with invalid primary parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": truee } - ---- -"cluster shard allocation explanation test with a valid, string primary parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": "true" } - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with an invalid, string primary parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": "truee" } - ---- -"cluster shard allocation explanation test with numerical current node parameter in the body": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /x_content_parse_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true, "current_node": 1 } - ---- -"cluster shard allocation explanation test with invalid include_disk_info parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_disk_info: truee - ---- -"cluster shard allocation explanation test with numerical include_disk_info parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_disk_info: 0 - ---- -"cluster shard allocation explanation test with a valid, string include_disk_info parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_disk_info: "true" - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with an invalid, string include_disk_info parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_disk_info: "truee" - ---- -"cluster shard allocation explanation test with invalid include_yes_decisions parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_yes_decisions: truee - ---- -"cluster shard allocation explanation test with numerical include_yes_decisions parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_yes_decisions: 0 - ---- -"cluster shard allocation explanation test with a valid, string include_yes_decisions parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_yes_decisions: "true" - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with an invalid, string include_yes_decisions parameter": - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - body: { "index": "test", "shard": 0, "primary": true } - include_yes_decisions: "truee" - --- "cluster shard allocation explanation test with 3 body parameters and all query parameters": - do: @@ -803,38 +490,6 @@ index: "test" body: { "shard": 0, "primary": true } ---- -"cluster shard allocation explanation test with numerical index parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: "0" - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - index: 0 - shard: 0 - primary: true - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "0" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - --- "cluster shard allocation explanation test with incorrect index parameter passed in URL": - requires: @@ -857,206 +512,3 @@ index: "test2" shard: 0 primary: true - ---- -"cluster shard allocation explanation test with an invalid, string shard parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: "wrong" - primary: true - ---- -"cluster shard allocation explanation test with a valid, string shard parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - index: "test" - shard: "0" - primary: true - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with float shard parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: 1.0 - primary: true - ---- -"cluster shard allocation explanation test with numerical primary parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: 0 - primary: 0 - ---- -"cluster shard allocation explanation test with invalid primary parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: 0 - primary: truee - ---- -"cluster shard allocation explanation test with a valid, string primary parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - cluster.allocation_explain: - index: "test" - shard: 0 - primary: "true" - - - match: { current_state: "started" } - - is_true: current_node.id - - match: { index: "test" } - - match: { shard: 0 } - - match: { primary: true } - - is_true: can_remain_on_current_node - - is_true: can_rebalance_cluster - - is_true: can_rebalance_to_other_node - - is_true: rebalance_explanation - ---- -"cluster shard allocation explanation test with an invalid, string primary parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: 0 - primary: "truee" - ---- -"cluster shard allocation explanation test with numerical current node parameter passed in URL": - - requires: - capabilities: - - method: GET - path: /_cluster/allocation/explain - capabilities: [ query_parameter_support ] - test_runner_features: [ capabilities ] - reason: "Query parameter support was added in version 9.2.0" - - - do: - indices.create: - index: test - - - match: { acknowledged: true } - - - do: - catch: /illegal_argument_exception/ - cluster.allocation_explain: - index: "test" - shard: 0 - primary: true - current_node: 1