Skip to content

Commit 7b77737

Browse files
[TEST] Remove YAML Tests
Removes YAML tests for the `/_cluster/allocation/explain` API. The tests passed in alternate values for the APIs. An example is passing "true" for fields expecting a boolean value. While this is explicitly supported by the API, this is not the correct place to be testing this behaviour, and resulted in the API specification failing validation. Relates #127028
1 parent 32e50d0 commit 7b77737

File tree

1 file changed

+0
-235
lines changed
  • rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain

1 file changed

+0
-235
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml

Lines changed: 0 additions & 235 deletions
Original file line numberDiff line numberDiff line change
@@ -803,38 +803,6 @@
803803
index: "test"
804804
body: { "shard": 0, "primary": true }
805805

806-
---
807-
"cluster shard allocation explanation test with numerical index parameter passed in URL":
808-
- requires:
809-
capabilities:
810-
- method: GET
811-
path: /_cluster/allocation/explain
812-
capabilities: [ query_parameter_support ]
813-
test_runner_features: [ capabilities ]
814-
reason: "Query parameter support was added in version 9.2.0"
815-
816-
- do:
817-
indices.create:
818-
index: "0"
819-
820-
- match: { acknowledged: true }
821-
822-
- do:
823-
cluster.allocation_explain:
824-
index: 0
825-
shard: 0
826-
primary: true
827-
828-
- match: { current_state: "started" }
829-
- is_true: current_node.id
830-
- match: { index: "0" }
831-
- match: { shard: 0 }
832-
- match: { primary: true }
833-
- is_true: can_remain_on_current_node
834-
- is_true: can_rebalance_cluster
835-
- is_true: can_rebalance_to_other_node
836-
- is_true: rebalance_explanation
837-
838806
---
839807
"cluster shard allocation explanation test with incorrect index parameter passed in URL":
840808
- requires:
@@ -857,206 +825,3 @@
857825
index: "test2"
858826
shard: 0
859827
primary: true
860-
861-
---
862-
"cluster shard allocation explanation test with an invalid, string shard parameter passed in URL":
863-
- requires:
864-
capabilities:
865-
- method: GET
866-
path: /_cluster/allocation/explain
867-
capabilities: [ query_parameter_support ]
868-
test_runner_features: [ capabilities ]
869-
reason: "Query parameter support was added in version 9.2.0"
870-
871-
- do:
872-
indices.create:
873-
index: test
874-
875-
- match: { acknowledged: true }
876-
877-
- do:
878-
catch: /illegal_argument_exception/
879-
cluster.allocation_explain:
880-
index: "test"
881-
shard: "wrong"
882-
primary: true
883-
884-
---
885-
"cluster shard allocation explanation test with a valid, string shard parameter passed in URL":
886-
- requires:
887-
capabilities:
888-
- method: GET
889-
path: /_cluster/allocation/explain
890-
capabilities: [ query_parameter_support ]
891-
test_runner_features: [ capabilities ]
892-
reason: "Query parameter support was added in version 9.2.0"
893-
894-
- do:
895-
indices.create:
896-
index: test
897-
898-
- match: { acknowledged: true }
899-
900-
- do:
901-
cluster.allocation_explain:
902-
index: "test"
903-
shard: "0"
904-
primary: true
905-
906-
- match: { current_state: "started" }
907-
- is_true: current_node.id
908-
- match: { index: "test" }
909-
- match: { shard: 0 }
910-
- match: { primary: true }
911-
- is_true: can_remain_on_current_node
912-
- is_true: can_rebalance_cluster
913-
- is_true: can_rebalance_to_other_node
914-
- is_true: rebalance_explanation
915-
916-
---
917-
"cluster shard allocation explanation test with float shard parameter passed in URL":
918-
- requires:
919-
capabilities:
920-
- method: GET
921-
path: /_cluster/allocation/explain
922-
capabilities: [ query_parameter_support ]
923-
test_runner_features: [ capabilities ]
924-
reason: "Query parameter support was added in version 9.2.0"
925-
926-
- do:
927-
indices.create:
928-
index: test
929-
930-
- match: { acknowledged: true }
931-
932-
- do:
933-
catch: /illegal_argument_exception/
934-
cluster.allocation_explain:
935-
index: "test"
936-
shard: 1.0
937-
primary: true
938-
939-
---
940-
"cluster shard allocation explanation test with numerical primary parameter passed in URL":
941-
- requires:
942-
capabilities:
943-
- method: GET
944-
path: /_cluster/allocation/explain
945-
capabilities: [ query_parameter_support ]
946-
test_runner_features: [ capabilities ]
947-
reason: "Query parameter support was added in version 9.2.0"
948-
949-
- do:
950-
indices.create:
951-
index: test
952-
953-
- match: { acknowledged: true }
954-
955-
- do:
956-
catch: /illegal_argument_exception/
957-
cluster.allocation_explain:
958-
index: "test"
959-
shard: 0
960-
primary: 0
961-
962-
---
963-
"cluster shard allocation explanation test with invalid primary parameter passed in URL":
964-
- requires:
965-
capabilities:
966-
- method: GET
967-
path: /_cluster/allocation/explain
968-
capabilities: [ query_parameter_support ]
969-
test_runner_features: [ capabilities ]
970-
reason: "Query parameter support was added in version 9.2.0"
971-
972-
- do:
973-
indices.create:
974-
index: test
975-
976-
- match: { acknowledged: true }
977-
978-
- do:
979-
catch: /illegal_argument_exception/
980-
cluster.allocation_explain:
981-
index: "test"
982-
shard: 0
983-
primary: truee
984-
985-
---
986-
"cluster shard allocation explanation test with a valid, string primary parameter passed in URL":
987-
- requires:
988-
capabilities:
989-
- method: GET
990-
path: /_cluster/allocation/explain
991-
capabilities: [ query_parameter_support ]
992-
test_runner_features: [ capabilities ]
993-
reason: "Query parameter support was added in version 9.2.0"
994-
995-
- do:
996-
indices.create:
997-
index: test
998-
999-
- match: { acknowledged: true }
1000-
1001-
- do:
1002-
cluster.allocation_explain:
1003-
index: "test"
1004-
shard: 0
1005-
primary: "true"
1006-
1007-
- match: { current_state: "started" }
1008-
- is_true: current_node.id
1009-
- match: { index: "test" }
1010-
- match: { shard: 0 }
1011-
- match: { primary: true }
1012-
- is_true: can_remain_on_current_node
1013-
- is_true: can_rebalance_cluster
1014-
- is_true: can_rebalance_to_other_node
1015-
- is_true: rebalance_explanation
1016-
1017-
---
1018-
"cluster shard allocation explanation test with an invalid, string primary parameter passed in URL":
1019-
- requires:
1020-
capabilities:
1021-
- method: GET
1022-
path: /_cluster/allocation/explain
1023-
capabilities: [ query_parameter_support ]
1024-
test_runner_features: [ capabilities ]
1025-
reason: "Query parameter support was added in version 9.2.0"
1026-
1027-
- do:
1028-
indices.create:
1029-
index: test
1030-
1031-
- match: { acknowledged: true }
1032-
1033-
- do:
1034-
catch: /illegal_argument_exception/
1035-
cluster.allocation_explain:
1036-
index: "test"
1037-
shard: 0
1038-
primary: "truee"
1039-
1040-
---
1041-
"cluster shard allocation explanation test with numerical current node parameter passed in URL":
1042-
- requires:
1043-
capabilities:
1044-
- method: GET
1045-
path: /_cluster/allocation/explain
1046-
capabilities: [ query_parameter_support ]
1047-
test_runner_features: [ capabilities ]
1048-
reason: "Query parameter support was added in version 9.2.0"
1049-
1050-
- do:
1051-
indices.create:
1052-
index: test
1053-
1054-
- match: { acknowledged: true }
1055-
1056-
- do:
1057-
catch: /illegal_argument_exception/
1058-
cluster.allocation_explain:
1059-
index: "test"
1060-
shard: 0
1061-
primary: true
1062-
current_node: 1

0 commit comments

Comments
 (0)