|
| 1 | +teardown: |
| 2 | + - do: |
| 3 | + cluster.delete_voting_config_exclusions: {} |
| 4 | + |
| 5 | +--- |
| 6 | +"Get cluster state without voting config exclusions": |
| 7 | + - skip: |
| 8 | + version: " - 6.99.99" |
| 9 | + reason: Voting config exclusions were introduced in 7.0.0 |
| 10 | + |
| 11 | + - do: |
| 12 | + cluster.state: {} |
| 13 | + |
| 14 | + - length: { metadata.cluster_coordination.voting_config_exclusions: 0 } |
| 15 | + |
| 16 | +--- |
| 17 | +"Add voting config exclusion by unknown node Id": |
| 18 | + - skip: |
| 19 | + version: " - 7.7.99" |
| 20 | + reason: Tests the new voting config exclusions API introduced in 7.8.0 |
| 21 | + |
| 22 | + - do: |
| 23 | + cluster.post_voting_config_exclusions: |
| 24 | + node_ids: nodeId |
| 25 | + |
| 26 | + - do: |
| 27 | + cluster.state: {} |
| 28 | + |
| 29 | + - length: { metadata.cluster_coordination.voting_config_exclusions: 1 } |
| 30 | + - match: { metadata.cluster_coordination.voting_config_exclusions.0.node_id: "nodeId" } |
| 31 | + - match: { metadata.cluster_coordination.voting_config_exclusions.0.node_name: "_absent_" } |
| 32 | + |
| 33 | +--- |
| 34 | +"Add voting config exclusion by unknown node Ids": |
| 35 | + - skip: |
| 36 | + version: " - 7.7.99" |
| 37 | + features: contains |
| 38 | + reason: "contains is a newly added assertion, and this tests the new voting config exclusions API introduced in 7.8.0" |
| 39 | + |
| 40 | + - do: |
| 41 | + cluster.post_voting_config_exclusions: |
| 42 | + node_ids: nodeId1,nodeId2 |
| 43 | + |
| 44 | + - do: |
| 45 | + cluster.state: {} |
| 46 | + |
| 47 | + - length: { metadata.cluster_coordination.voting_config_exclusions: 2 } |
| 48 | + - contains : { metadata.cluster_coordination.voting_config_exclusions: {node_id: "nodeId1", node_name: "_absent_"} } |
| 49 | + - contains : { metadata.cluster_coordination.voting_config_exclusions: {node_id: "nodeId2", node_name: "_absent_"} } |
| 50 | + |
| 51 | +--- |
| 52 | +"Add voting config exclusion by unknown node name": |
| 53 | + - skip: |
| 54 | + version: " - 7.7.99" |
| 55 | + reason: Tests the new voting config exclusions API introduced in 7.8.0 |
| 56 | + |
| 57 | + - do: |
| 58 | + cluster.post_voting_config_exclusions: |
| 59 | + node_names: nodeName |
| 60 | + |
| 61 | + - do: |
| 62 | + cluster.state: {} |
| 63 | + |
| 64 | + - length: { metadata.cluster_coordination.voting_config_exclusions: 1 } |
| 65 | + - match: { metadata.cluster_coordination.voting_config_exclusions.0.node_id: "_absent_" } |
| 66 | + - match: { metadata.cluster_coordination.voting_config_exclusions.0.node_name: "nodeName" } |
| 67 | + |
| 68 | +--- |
| 69 | +"Add voting config exclusion by unknown node names": |
| 70 | + - skip: |
| 71 | + version: " - 7.7.99" |
| 72 | + features: contains |
| 73 | + reason: "contains is a newly added assertion, and this tests the new voting config exclusions API introduced in 7.8.0" |
| 74 | + |
| 75 | + - do: |
| 76 | + cluster.post_voting_config_exclusions: |
| 77 | + node_names: nodeName1,nodeName2 |
| 78 | + |
| 79 | + - do: |
| 80 | + cluster.state: {} |
| 81 | + |
| 82 | + - length: { metadata.cluster_coordination.voting_config_exclusions: 2 } |
| 83 | + - contains : { metadata.cluster_coordination.voting_config_exclusions: {node_id: "_absent_", node_name: "nodeName1"} } |
| 84 | + - contains : { metadata.cluster_coordination.voting_config_exclusions: {node_id: "_absent_", node_name: "nodeName2"} } |
| 85 | + |
| 86 | +--- |
| 87 | +"Throw exception when adding voting config exclusion without specifying nodes": |
| 88 | + - skip: |
| 89 | + version: " - 7.7.99" |
| 90 | + reason: Tests the new voting config exclusions API introduced in 7.8.0 |
| 91 | + |
| 92 | + - do: |
| 93 | + catch: /Please set node identifiers correctly. One and only one of \[node_name\], \[node_names\] and \[node_ids\] has to be set/ |
| 94 | + cluster.post_voting_config_exclusions: {} |
| 95 | + |
| 96 | +--- |
| 97 | +"Throw exception when adding voting config exclusion and specifying both node_ids and node_names": |
| 98 | + - skip: |
| 99 | + version: " - 7.7.99" |
| 100 | + reason: Tests the new voting config exclusions API introduced in 7.8.0 |
| 101 | + |
| 102 | + - do: |
| 103 | + catch: /Please set node identifiers correctly. One and only one of \[node_name\], \[node_names\] and \[node_ids\] has to be set/ |
| 104 | + cluster.post_voting_config_exclusions: |
| 105 | + node_ids: nodeId |
| 106 | + node_names: nodeName |
| 107 | + |
0 commit comments