---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
- do:
    indices.create:
      index: "test_1"
      body:
        settings:
          number_of_shards: 5
          number_of_replicas: 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"
- do:
    indices.create:
      index: "test_2"
      body:
        settings:
          number_of_shards: 3
          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"
---
Get /_settings:
- do:
    indices.get_settings: {}
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_1.settings.index.number_of_replicas: "1"
- match:
    test_2.settings.index.number_of_shards: "3"
- match:
    test_2.settings.index.number_of_replicas: "0"
---
Get /{index}/_settings:
- do:
    indices.get_settings:
      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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_1.settings.index.number_of_replicas: "1"
- is_false: "test_2"
---
Get /{index}/_settings/_all:
- do:
    indices.get_settings:
      index: "test_1"
      name: "_all"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_1.settings.index.number_of_replicas: "1"
- is_false: "test_2"
---
Get /{index}/_settings/*:
- do:
    indices.get_settings:
      index: "test_1"
      name: "*"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_1.settings.index.number_of_replicas: "1"
- is_false: "test_2"
---
Get /{index}/_settings/{name}:
- do:
    indices.get_settings:
      index: "test_1"
      name: "index.number_of_shards"
    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:
    test_1.settings.index.number_of_shards: "5"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2"
---
Get /{index}/_settings/{name,name}:
- do:
    indices.get_settings:
      index: "test_1"
      name: "index.number_of_shards,index.number_of_replicas"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_1.settings.index.number_of_replicas: "1"
- is_false: "test_2"
---
Get /{index}/_settings/{name*}:
- do:
    indices.get_settings:
      index: "test_1"
      name: "index.number_of_s*"
    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:
    test_1.settings.index.number_of_shards: "5"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2"
---
Get /_settings/{name}:
- do:
    indices.get_settings:
      name: "index.number_of_shards"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_2.settings.index.number_of_shards: "3"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2.settings.index.number_of_replicas"
---
Get /_all/_settings/{name}:
- do:
    indices.get_settings:
      index: "_all"
      name: "index.number_of_shards"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_2.settings.index.number_of_shards: "3"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2.settings.index.number_of_replicas"
---
Get /*/_settings/{name}:
- do:
    indices.get_settings:
      index: "*"
      name: "index.number_of_shards"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_2.settings.index.number_of_shards: "3"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2.settings.index.number_of_replicas"
---
Get /index,index/_settings/{name}:
- do:
    indices.get_settings:
      index: "test_1,test_2"
      name: "index.number_of_shards"
    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:
    test_1.settings.index.number_of_shards: "5"
- match:
    test_2.settings.index.number_of_shards: "3"
- is_false: "test_1.settings.index.number_of_replicas"
- is_false: "test_2.settings.index.number_of_replicas"
---
Get /index*/_settings/{name}:
- do:
    indices.get_settings:
      index: "*2"
      name: "index.number_of_shards"
    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:
    test_2.settings.index.number_of_shards: "3"
- is_false: "test_1"
- is_false: "test_2.settings.index.number_of_replicas"
---
Get /_settings with local flag:
- do:
    indices.get_settings:
      local: true
    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: "test_1"
- is_true: "test_2"
