---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Deprecated parameters should fail in Bulk query:
- do:
    catch: "bad_request"
    bulk:
      body: "{ \"update\": { \"_index\": \"test_index\", \"_type\": \"test_type\"\
        , \"_id\": \"test_id_1\", \"_version\": 1 } }\n{ \"doc\": { \"f1\": \"v1\"\
        \ } }\n{ \"update\": { \"_index\": \"test_index\", \"_type\": \"test_type\"\
        , \"_id\": \"test_id_2\", \"_version\": 1 } }\n{ \"doc\": { \"f1\": \"v2\"\
        \ } }\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:
    catch: "bad_request"
    bulk:
      body: "{ \"update\": { \"_index\": \"test_index\", \"_type\": \"test_type\"\
        , \"_id\": \"test_id_1\", \"_routing\": \"test1\" } }\n{ \"doc\": { \"f1\"\
        : \"v1\" } }\n{ \"update\": { \"_index\": \"test_index\", \"_type\": \"test_type\"\
        , \"_id\": \"test_id_2\", \"_routing\": \"test1\" } }\n{ \"doc\": { \"f1\"\
        : \"v2\" } }\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"
