---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Store stats:
- requires:
    test_runner_features:
    - "arbitrary_key"
    cluster_features:
    - "gte_v7.13.0"
    reason: "total_data_set_size added in 7.13"
- do:
    nodes.info:
      node_id: "_master"
    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_: "master"
- do:
    nodes.stats:
      metric:
      - "indices"
      index_metric:
      - "store"
    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"
- is_false: "nodes.$master.discovery"
- is_true: "nodes.$master.indices.store"
- gte:
    nodes.$master.indices.store.size_in_bytes: 0
- gte:
    nodes.$master.indices.store.reserved_in_bytes: -1
- set:
    nodes.$master.indices.store.size_in_bytes: "size_in_bytes"
- match:
    nodes.$master.indices.store.total_data_set_size_in_bytes: "$size_in_bytes"
---
Store stats bwc:
- skip:
    features:
    - "arbitrary_key"
- do:
    nodes.info:
      node_id: "_master"
    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_: "master"
- do:
    nodes.stats:
      metric:
      - "indices"
      index_metric:
      - "store"
    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"
- is_false: "nodes.$master.discovery"
- is_true: "nodes.$master.indices.store"
- gte:
    nodes.$master.indices.store.size_in_bytes: 0
- gte:
    nodes.$master.indices.store.reserved_in_bytes: -1
