---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Test cat nodes output:
- do:
    cat.nodes: {}
    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: "/  #ip                          heap.percent        ram.percent     cpu\
      \         load_1m                load_5m                load_15m           \
      \    node.role                   master          name\n^  ([0-9a-fA-F.:]+  \\\
      s+  \\d+            \\s+  \\d*         \\s+ (-)?\\d* \\s+ ((-)?\\d*(\\.\\d+)?)?\
      \ \\s+ ((-)?\\d*(\\.\\d+)?)?\\s+  ((-)?\\d*(\\.\\d+)?)? \\s+ (-|[cdfhilmrstvwIS]{1,11})\
      \ \\s+ [-*x]     \\s+   .*     \\n)+  $/\n"
- do:
    cat.nodes:
      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: "/^  ip                     \\s+  heap\\.percent   \\s+  ram\\.percent\
      \ \\s+ cpu      \\s+ load_1m            \\s+ load_5m            \\s+ load_15m\
      \           \\s+ node\\.role              \\s+  master   \\s+   name  \\n\n\
      \   ([0-9a-fA-F.:]+  \\s+  \\d+             \\s+  \\d*          \\s+ (-)?\\\
      d* \\s+  ((-)?\\d*(\\.\\d+)?)? \\s+ ((-)?\\d*(\\.\\d+)?)? \\s+ ((-)?\\d*(\\\
      .\\d+)?)? \\s+ (-|[cdfhilmrstvwIS]{1,11}) \\s+  [-*x]    \\s+   .*    \\n)+\
      \  $/\n"
- do:
    cat.nodes:
      h: "heap.current,heap.percent,heap.max"
      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: "/^      heap\\.current          \\s+  heap\\.percent  \\s+  heap\\.max\
      \              \\n\n   (\\s+ \\d+(\\.\\d+)?[ptgmk]?b   \\s+  \\d+          \
      \  \\s+  \\d+(\\.\\d+)?[ptgmk]?b   \\n)+  $/\n"
- do:
    cat.nodes:
      h: "heap.*"
      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: "/^      heap\\.current          \\s+  heap\\.percent  \\s+  heap\\.max\
      \              \\n\n   (\\s+ \\d+(\\.\\d+)?[ptgmk]?b   \\s+  \\d+          \
      \  \\s+  \\d+(\\.\\d+)?[ptgmk]?b   \\n)+  $/\n"
- do:
    cat.nodes:
      h: "file_desc.current,file_desc.percent,file_desc.max"
      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: "/^      file_desc\\.current  \\s+  file_desc\\.percent  \\s+  file_desc\\\
      .max   \\n\n   (\\s+ (-1|\\d+)            \\s+  \\d+                 \\s+  (-1|\\\
      d+)         \\n)+  $/\n"
- do:
    cat.nodes:
      h: "http"
      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: "/^      http \\n (\\[?[0-9a-fA-F.:]+\\]?:\\d{1,5}\\n)+  $/\n"
---
Additional disk information:
- do:
    cat.nodes:
      h: "diskAvail,diskTotal,diskUsed,diskUsedPercent"
      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: "/^  \\s* diskAvail            \\s+ diskTotal            \\s+ diskUsed\
      \            \\s+ diskUsedPercent            \\n\n   (\\s* \\d+(\\.\\d+)?[ptgmk]?b\
      \ \\s+ \\d+(\\.\\d+)?[ptgmk]?b \\s+ \\d+(\\.\\d+)?[ptgmk]?b\\s+ (100\\.00 |\
      \ \\d{1,2}\\.\\d{2}) \\n)+  $/\n"
- do:
    cat.nodes:
      h: "disk,dt,du,dup"
      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: "/^  \\s* disk                 \\s+ dt                   \\s+ du      \
      \            \\s+ dup                        \\n\n   (\\s* \\d+(\\.\\d+)?[ptgmk]?b\
      \ \\s+ \\d+(\\.\\d+)?[ptgmk]?b \\s+ \\d+(\\.\\d+)?[ptgmk]?b\\s+ (100\\.00 |\
      \ \\d{1,2}\\.\\d{2}) \\n)+  $/\n"
---
Test cat nodes output with full_id set:
- do:
    cat.nodes:
      h: "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: "/^(\\S{4}\\n)+$/\n"
- do:
    cat.nodes:
      h: "id"
      full_id: 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: "/^(\\S{5,}\\n)+$/\n"
