---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Allocation stats:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "allocation stats was added in 8.14.0"
    test_runner_features:
    - "arbitrary_key"
- do:
    nodes.info: {}
    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"
- set:
    nodes._arbitrary_key_: "node_id"
- do:
    nodes.stats:
      metric:
      - "allocations"
    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"
- exists: "nodes.$node_id.allocations"
- exists: "nodes.$node_id.allocations.shards"
- exists: "nodes.$node_id.allocations.undesired_shards"
- exists: "nodes.$node_id.allocations.forecasted_ingest_load"
- exists: "nodes.$node_id.allocations.forecasted_disk_usage_in_bytes"
- exists: "nodes.$node_id.allocations.current_disk_usage_in_bytes"
