---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Noop:
- requires:
    cluster_features:
    - "gte_v8.14.0"
    reason: "fixed in 8.14.0"
- do:
    indices.create:
      index: "test_1"
      body:
        settings:
          number_of_shards: 1
          number_of_replicas: 0
    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"
- do:
    cluster.health:
      wait_for_status: "green"
    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"
- do:
    bulk:
      refresh: true
      body: "{ \"create\": { \"_index\": \"test_1\", \"_id\": \"1\"} }\n{ \"foo\"\
        : \"bar\" }\n{ \"create\": { \"_index\": \"test_1\", \"_id\": \"2\"} }\n{\
        \ \"foo\": \"bar\" }\n"
    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"
- do:
    indices.stats:
      index: "test_1"
    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"
- match:
    indices.test_1.total.indexing.index_total: 2
- match:
    indices.test_1.primaries.indexing.index_total: 2
- match:
    indices.test_1.total.indexing.noop_update_total: 0
- match:
    indices.test_1.primaries.indexing.noop_update_total: 0
- do:
    bulk:
      body: "{ \"update\": { \"_index\": \"test_1\", \"_id\": \"1\"} }\n{ \"doc\"\
        : { \"foo\": \"bar\" } }\n{ \"update\": { \"_index\": \"test_1\", \"_id\"\
        : \"2\"} }\n{ \"doc\": { \"foo\": \"bar\" } }\n"
    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"
- match:
    items.0.update.result: "noop"
- match:
    items.1.update.result: "noop"
- do:
    indices.stats:
      index: "test_1"
    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"
- match:
    indices.test_1.total.indexing.index_total: 2
- match:
    indices.test_1.primaries.indexing.index_total: 2
- match:
    indices.test_1.total.indexing.noop_update_total: 2
- match:
    indices.test_1.primaries.indexing.noop_update_total: 2
