Skip to content

Commit

Permalink
Add comments in cat.health yaml rest test
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng committed Mar 14, 2022
1 parent 2d32ac0 commit eb3f1ed
Showing 1 changed file with 76 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"Help - pre 2.0.0":
"Help - before 2.0.0":
- skip:
version: " - 7.10.99 , 2.0.0 - "
reason: "discovered_master added in OpenSearch 1.0.0, and renamed to discovered_cluster_manager in 2.0.0"
Expand All @@ -8,27 +8,32 @@
cat.health:
help: true
node_selector:
version: "1.0.0 - 1.4.99" # Only send request to nodes in <2.0 versions, especially during mixedClusterTest.
# Only send request to nodes in <2.0 versions, especially during ':qa:mixed-cluster:v1.x.x#mixedClusterTest'.
# Because YAML REST test takes the minimum OpenSearch version in the cluster to apply the filter in 'skip' section,
# see OpenSearchClientYamlSuiteTestCase#initAndResetContext() for detail.
# During 'mixedClusterTest', the cluster can be mixed with nodes in 1.x and 2.x versions,
# so node_selector is required, and only filtering version in 'skip' is not enough.
version: "1.0.0 - 1.4.99"

- match:
$body: |
/^ epoch .+ \n
timestamp .+ \n
cluster .+ \n
status .+ \n
node.total .+ \n
node.data .+ \n
discovered_master .+ \n
shards .+ \n
pri .+ \n
relo .+ \n
init .+ \n
unassign .+ \n
pending_tasks .+ \n
max_task_wait_time .+ \n
active_shards_percent .+ \n
/^ epoch .+ \n
timestamp .+ \n
cluster .+ \n
status .+ \n
node.total .+ \n
node.data .+ \n
discovered_master .+ \n
shards .+ \n
pri .+ \n
relo .+ \n
init .+ \n
unassign .+ \n
pending_tasks .+ \n
max_task_wait_time .+ \n
active_shards_percent .+ \n
$/
$/
---
"Help":
Expand All @@ -41,23 +46,23 @@

- match:
$body: |
/^ epoch .+ \n
timestamp .+ \n
cluster .+ \n
status .+ \n
node.total .+ \n
node.data .+ \n
discovered_cluster_manager .+ \n
shards .+ \n
pri .+ \n
relo .+ \n
init .+ \n
unassign .+ \n
pending_tasks .+ \n
max_task_wait_time .+ \n
active_shards_percent .+ \n
$/
/^ epoch .+ \n
timestamp .+ \n
cluster .+ \n
status .+ \n
node.total .+ \n
node.data .+ \n
discovered_cluster_manager .+ \n
shards .+ \n
pri .+ \n
relo .+ \n
init .+ \n
unassign .+ \n
pending_tasks .+ \n
max_task_wait_time .+ \n
active_shards_percent .+ \n
$/
---
"Empty cluster":
Expand All @@ -69,25 +74,25 @@

- match:
$body: |
/^
( \d+ \s+ # epoch
\d\d:\d\d:\d\d \s+ # timestamp
\S+ \s+ # cluster
\w+ \s+ # status
\d+ \s+ # node.total
\d+ \s+ # node.data
\w+ \s+ # discovered_master
\d+ \s+ # shards
\d+ \s+ # pri
\d+ \s+ # relo
\d+ \s+ # init
\d+ \s+ # unassign
\d+ \s+ # pending_tasks
(-|\d+(?:[.]\d+)?m?s) \s+ # max task waiting time
\d+\.\d+% # active shards percent
\n
)+
$/
/^
( \d+ \s+ # epoch
\d\d:\d\d:\d\d \s+ # timestamp
\S+ \s+ # cluster
\w+ \s+ # status
\d+ \s+ # node.total
\d+ \s+ # node.data
\w+ \s+ # discovered_master
\d+ \s+ # shards
\d+ \s+ # pri
\d+ \s+ # relo
\d+ \s+ # init
\d+ \s+ # unassign
\d+ \s+ # pending_tasks
(-|\d+(?:[.]\d+)?m?s) \s+ # max task waiting time
\d+\.\d+% # active shards percent
\n
)+
$/
---
"With ts parameter":
Expand All @@ -100,20 +105,20 @@

- match:
$body: |
/^
( \S+ \s+ # cluster
\w+ \s+ # status
\d+ \s+ # node.total
\d+ \s+ # node.data
\w+ \s+ # discovered_master
\d+ \s+ # shards
\d+ \s+ # pri
\d+ \s+ # relo
\d+ \s+ # init
\d+ \s+ # unassign
\d+ \s+ # pending_tasks
(-|\d+(?:[.]\d+)?m?s) \s+ # max task waiting time
\d+\.\d+% # active shards percent
\n
)+
$/
/^
( \S+ \s+ # cluster
\w+ \s+ # status
\d+ \s+ # node.total
\d+ \s+ # node.data
\w+ \s+ # discovered_master
\d+ \s+ # shards
\d+ \s+ # pri
\d+ \s+ # relo
\d+ \s+ # init
\d+ \s+ # unassign
\d+ \s+ # pending_tasks
(-|\d+(?:[.]\d+)?m?s) \s+ # max task waiting time
\d+\.\d+% # active shards percent
\n
)+
$/

0 comments on commit eb3f1ed

Please sign in to comment.