---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Test cat tasks output:
- do:
    cat.tasks: {}
    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: "/ # action  task_id      parent_task_id      type    start_time   timestamp\
      \            running_time  ip                                  node\n^(  \\\
      S+\\s+  \\S+\\:\\d+\\s+  (?:\\-|\\S+\\:\\d+)\\s+  \\S+\\s+  \\d+\\s+       \\\
      d\\d\\:\\d\\d\\:\\d\\d\\s+  \\S+\\s+        [0-9a-f:.%]+\\s+  \\S+\\n)+$/\n"
- do:
    cat.tasks:
      detailed: 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: "/ # action  task_id      parent_task_id      type    start_time   timestamp\
      \            running_time  ip                                  node   description\n\
      ^(  \\S+\\s+  \\S+\\:\\d+\\s+  (?:\\-|\\S+\\:\\d+)\\s+  \\S+\\s+  \\d+\\s+ \
      \      \\d\\d\\:\\d\\d\\:\\d\\d\\s+  \\S+\\s+        [0-9a-f:.%]+\\s+  \\S+\\\
      s+ .*\\n)+$/\n"
---
Test cat tasks output with X-Opaque-Id:
- requires:
    cluster_features:
    - "gte_v7.10.0"
    reason: "support for opaque_id was added in 7.10.0"
    test_runner_features:
    - "headers"
- do:
    headers:
      X-Opaque-Id: "TestID"
    cat.tasks:
      h:
      - "action"
      - "x_opaque_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: "/TestID/"
