---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Help:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast are added\
      \ in 8.14.0"
- do:
    cat.allocation:
      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: "/^  shards                .+   \\n\n    shards.undesired      .+   \\\
      n\n    write_load.forecast   .+   \\n\n    disk.indices.forecast .+   \\n\n\
      \    disk.indices          .+   \\n\n    disk.used             .+   \\n\n  \
      \  disk.avail            .+   \\n\n    disk.total            .+   \\n\n    disk.percent\
      \          .+   \\n\n    host                  .+   \\n\n    ip            \
      \        .+   \\n\n    node                  .+   \\n\n    node.role       \
      \      .+   \\n\n$/\n"
---
One index:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast columns\
      \ are added in 8.14.0"
- do:
    indices.create:
      index: "test"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    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"
- do:
    cat.allocation: {}
    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*                          #allow leading spaces to account\
      \ for right-justified text\n    \\d+                    \\s+\n    \\d+     \
      \               \\s+\n    \\d+(\\.\\d+)?            \\s+\n    \\d+(\\.\\d+)?[kmgt]?b\
      \    \\s+\n    \\d+(\\.\\d+)?[kmgt]?b    \\s+\n    \\d+(\\.\\d+)?[kmgt]?b  \
      \  \\s+\n    (\\d+(\\.\\d+)?[kmgt]b   \\s+)  #always should return value since\
      \ we filter out non data nodes by default\n    (\\d+(\\.\\d+)?[kmgt]b   \\s+)\
      \  #always should return value since we filter out non data nodes by default\n\
      \    (\\d+                  \\s+)  #always should return value since we filter\
      \ out non data nodes by default\n    [-\\w.%:]+             \\s+\n    [-\\w.:]+\
      \              \\s+\n    [-\\w.]+               \\s+\n    [\\w]+\n    \\n\n\
      \  )+\n  (\n    \\s*                          #allow leading spaces to account\
      \ for right-justified text\n    \\d+                    \\s+\n    UNASSIGNED\
      \             \\s*\n    \\n\n  )?\n$/\n"
---
Node ID:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast columns\
      \ are added in 8.14.0"
- do:
    cat.allocation:
      node_id: "_master"
    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+   #usually 0, unless some system\
      \ index has been recreated before this runs\n    \\d+                    \\\
      s+\n    \\d+(\\.\\d+)?            \\s+\n    \\d+(\\.\\d+)?[kmgt]?b    \\s+\n\
      \    \\d+(\\.\\d+)?[kmgt]?b    \\s+\n    \\d+(\\.\\d+)?[kmgt]?b    \\s+\n  \
      \  (\\d+(\\.\\d+)?[kmgt]b   \\s+)?  #no value from client nodes\n    (\\d+(\\\
      .\\d+)?[kmgt]b   \\s+)?  #no value from client nodes\n    (\\d+            \
      \      \\s+)?  #no value from client nodes\n    [-\\w.%:]+             \\s+\n\
      \    [-\\w.:]+              \\s+\n    [-\\w.]+               \\s+\n    [\\w]+\n\
      \    \\n\n  )\n$/\n"
- do:
    cat.allocation:
      node_id: "non_existent"
    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$/\n"
---
All Nodes:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast columns\
      \ are added in 8.14.0"
- do:
    cat.allocation:
      node_id: "*"
    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*                          #allow leading spaces to account\
      \ for right-justified text\n    \\d+                    \\s+   #usually 0, unless\
      \ some system index has been recreated before this runs\n    \\d+          \
      \          \\s+\n    \\d+(\\.\\d+)?            \\s+\n    \\d+(\\.\\d+)?[kmgt]?b\
      \    \\s+\n    \\d+(\\.\\d+)?[kmgt]?b    \\s+\n    \\d+(\\.\\d+)?[kmgt]?b  \
      \  \\s+\n    (\\d+(\\.\\d+)?[kmgt]b   \\s+)?  #no value from client nodes\n\
      \    (\\d+(\\.\\d+)?[kmgt]b   \\s+)?  #no value from client nodes\n    (\\d+\
      \                  \\s+)?  #no value from client nodes\n    [-\\w.%:]+     \
      \        \\s+\n    [-\\w.:]+              \\s+\n    [-\\w.]+               \\\
      s+\n    [\\w]+\n    \\n\n  )+\n  (\n    \\s*                          #allow\
      \ leading spaces to account for right-justified text\n    \\d+             \
      \       \\s+\n    UNASSIGNED             \\s*\n    \\n\n  )?\n$/\n"
---
Column headers:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast columns\
      \ are added in 8.14.0"
- do:
    cat.allocation:
      v: 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: "/^  shards                  \\s+\n    shards.undesired        \\s+\n \
      \   write_load.forecast     \\s+\n    disk.indices.forecast   \\s+\n    disk.indices\
      \            \\s+\n    disk.used               \\s+\n    disk.avail        \
      \      \\s+\n    disk.total              \\s+\n    disk.percent            \\\
      s+\n    host                    \\s+\n    ip                      \\s+\n   \
      \ node                    \\s+\n    node.role\n    \\n\n\n   ( \\s*        \
      \                  #allow leading spaces to account for right-justified text\n\
      \     \\d+                    \\s+   #usually 0, unless some system index has\
      \ been recreated before this runs\n     \\d+                    \\s+\n     \\\
      d+(\\.\\d+)?            \\s+\n     \\d+(\\.\\d+)?[kmgt]?b    \\s+\n     \\d+(\\\
      .\\d+)?[kmgt]?b    \\s+\n     \\d+(\\.\\d+)?[kmgt]?b    \\s+\n     (\\d+(\\\
      .\\d+)?[kmgt]b   \\s+)  #always should return value since we filter out non\
      \ data nodes by default\n     (\\d+(\\.\\d+)?[kmgt]b   \\s+)  #always should\
      \ return value since we filter out non data nodes by default\n     (\\d+   \
      \               \\s+)  #always should return value since we filter out non data\
      \ nodes by default\n     [-\\w.%:]+             \\s+\n     [-\\w.:]+       \
      \       \\s+\n     [-\\w.]+               \\s+\n     [\\w]+\n     \\n\n   )+\n\
      \ $/\n"
---
Select columns:
- do:
    cat.allocation:
      h:
      - "disk.percent"
      - "node"
      v: 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  ( \\d*                 \\s+\n    [-\\w.]+\n    \\n\n  )+\n$/\n"
- do:
    cat.allocation:
      h:
      - "disk.percent"
      - "node"
      v: 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: "/^\n  disk.percent          \\s+\n  node\n  \\n\n  (\n    \\s+\\d*   \
      \        \\s+\n    [-\\w.]+\n    \\n\n  )+\n$/\n"
---
Bytes:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "shards.undesired, write_load.forecast and disk.indices.forecast columns\
      \ are added in 8.14.0"
- do:
    cat.allocation:
      bytes: "gb"
    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+    #usually 0, unless some system index\
      \ has been recreated before this runs\n    \\d+                 \\s+\n    \\\
      d+(\\.\\d+)?         \\s+\n    \\d+                 \\s+\n    0            \
      \       \\s+\n    \\d+                 \\s+\n    (\\d+                 \\s+)\
      \  #always should return value since we filter out non data nodes by default\n\
      \    (\\d+                 \\s+)  #always should return value since we filter\
      \ out non data nodes by default\n    (\\d+                 \\s+)  #always should\
      \ return value since we filter out non data nodes by default\n   [-\\w.%:]+\
      \             \\s+\n   [-\\w.:]+              \\s+\n    [-\\w.]+           \
      \    \\s+\n    [\\w]+\n    \\n\n  )+\n$/\n"
---
Node roles:
- requires:
    cluster_features:
    - "gte_v8.10.0"
    reason: "node.role column added in 8.10.0"
- do:
    cat.allocation:
      h:
      - "node"
      - "node.role"
    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  ( [-\\w.]+                \\s+\n    [\\w]+\n    \\n\n  )+\n$/\n"
---
Node forecasts:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "write_load.forecast and disk.indices.forecast columns added in 8.14.0"
- do:
    cat.allocation:
      h:
      - "node"
      - "shards.undesired"
      - "write_load.forecast"
      - "disk.indices.forecast"
    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  ( [-\\w.]+                \\s+\n    [-\\w.]+                \\s+\n\
      \    [-\\w.]+                \\s+\n    [-\\w.]+\n    \\n\n  )+\n$/\n"
