---
setup:
- skip:
    features:
    - "arbitrary_key"
    - "headers"
    - "allowed_warnings_regex"
---
node_info test:
- 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"
- is_true: "nodes"
- is_true: "cluster_name"
---
node_info role test:
- requires:
    cluster_features:
    - "gte_v7.8.0"
    reason: "node roles were not sorted before 7.8.0"
    test_runner_features:
    - "no_xpack"
- 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"
- is_true: "nodes.$node_id.roles"
- match:
    nodes.$node_id.roles.0: "data"
- match:
    nodes.$node_id.roles.1: "data_cold"
- match:
    nodes.$node_id.roles.2: "data_content"
- match:
    nodes.$node_id.roles.3: "data_frozen"
- match:
    nodes.$node_id.roles.4: "data_hot"
- match:
    nodes.$node_id.roles.5: "data_warm"
- match:
    nodes.$node_id.roles.6: "ingest"
- match:
    nodes.$node_id.roles.7: "master"
- match:
    nodes.$node_id.roles.8: "ml"
- match:
    nodes.$node_id.roles.9: "remote_cluster_client"
- match:
    nodes.$node_id.roles.10: "transform"
