---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Help:
- requires:
    capabilities:
    - method: "GET"
      path: "/_cluster/health"
      capabilities:
      - "unassigned_pri_shard_count"
    test_runner_features: "capabilities"
    reason: "Capability required to run test"
- do:
    cat.health:
      help: true
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    $body: "/^  epoch         .+\\n\n    timestamp     .+\\n\n    cluster       .+\\\
      n\n    status        .+\\n\n    node.total    .+\\n\n    node.data     .+\\\
      n\n    shards        .+\\n\n    pri           .+\\n\n    relo          .+\\\
      n\n    init          .+\\n\n    unassign      .+\\n\n    unassign.pri  .+\\\
      n\n    pending_tasks .+\\n\n    max_task_wait_time .+\\n\n    active_shards_percent\
      \ .+\\n\n$/\n"
---
Empty cluster:
- requires:
    capabilities:
    - method: "GET"
      path: "/_cluster/health"
      capabilities:
      - "unassigned_pri_shard_count"
    test_runner_features: "capabilities"
    reason: "Capability required to run test"
- do:
    cat.health: {}
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    $body: "/^\n  ( \\d+            \\s+ # epoch\n    \\d\\d:\\d\\d:\\d\\d \\s+ #\
      \ timestamp\n    \\S+            \\s+ # cluster\n    \\w+            \\s+ #\
      \ status\n    \\d+            \\s+ # node.total\n    \\d+            \\s+ #\
      \ node.data\n    \\d+            \\s+ # shards\n    \\d+            \\s+ # pri\n\
      \    \\d+            \\s+ # relo\n    \\d+            \\s+ # init\n    \\d+\
      \            \\s+ # unassign\n    \\d+            \\s+ # unassign.pri\n    \\\
      d+            \\s+ # pending_tasks\n    (-|\\d+(?:[.]\\d+)?m?s) \\s+ # max task\
      \ waiting time\n    \\d+\\.\\d+%             # active shards percent\n    \\\
      n\n  )+\n$/\n"
---
With ts parameter:
- requires:
    capabilities:
    - method: "GET"
      path: "/_cluster/health"
      capabilities:
      - "unassigned_pri_shard_count"
    test_runner_features: "capabilities"
    reason: "Capability required to run test"
- do:
    cat.health:
      ts: false
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    $body: "/^\n  ( \\S+            \\s+ # cluster\n    \\w+            \\s+ # status\n\
      \    \\d+            \\s+ # node.total\n    \\d+            \\s+ # node.data\n\
      \    \\d+            \\s+ # shards\n    \\d+            \\s+ # pri\n    \\d+\
      \            \\s+ # relo\n    \\d+            \\s+ # init\n    \\d+        \
      \    \\s+ # unassign\n    \\d+            \\s+ # unassign.pri\n    \\d+    \
      \        \\s+ # pending_tasks\n    (-|\\d+(?:[.]\\d+)?m?s) \\s+ # max task waiting\
      \ time\n    \\d+\\.\\d+%             # active shards percent\n    \\n\n  )+\n\
      $/\n"
