---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
cluster health basic test:
- requires:
    cluster_features: "gte_v8.13.0"
    reason: "data stream lifecycle indicator was added in 8.13.0"
- do:
    health_report: {}
    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_true: "cluster_name"
- is_true: "status"
- match:
    indicators.master_is_stable.status: "green"
- match:
    indicators.master_is_stable.symptom: "The cluster has a stable master node"
- is_true: "indicators.master_is_stable.details.current_master.node_id"
- is_true: "indicators.master_is_stable.details.current_master.name"
- is_true: "indicators.master_is_stable.details.recent_masters.0.node_id"
- is_true: "indicators.master_is_stable.details.recent_masters.0.name"
- match:
    indicators.repository_integrity.status: "green"
- match:
    indicators.repository_integrity.symptom: "No snapshot repositories configured."
- is_true: "indicators.disk.status"
- is_true: "indicators.disk.symptom"
- match:
    indicators.shards_availability.status: "green"
- match:
    indicators.shards_availability.symptom: "This cluster has all shards available."
- exists: "indicators.shards_availability.details.initializing_replicas"
- exists: "indicators.shards_availability.details.creating_primaries"
- exists: "indicators.shards_availability.details.restarting_replicas"
- exists: "indicators.shards_availability.details.unassigned_primaries"
- exists: "indicators.shards_availability.details.started_replicas"
- exists: "indicators.shards_availability.details.creating_replicas"
- exists: "indicators.shards_availability.details.initializing_primaries"
- exists: "indicators.shards_availability.details.restarting_primaries"
- exists: "indicators.shards_availability.details.started_primaries"
- exists: "indicators.shards_availability.details.unassigned_replicas"
- is_true: "indicators.shards_capacity.status"
- is_true: "indicators.shards_capacity.symptom"
- is_true: "indicators.data_stream_lifecycle.status"
- is_true: "indicators.data_stream_lifecycle.symptom"
