mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 21:18:31 +00:00
Added base TransportAction class for master read operations that execute locally or not depending on the request class (local flag). Added support for local flag where missing, in a backwards compatible manner: - IndicesExistsRequest - GetAliasesRequest (get alias api, aliases exist api) - TypesExistsRequest - GetIndexTemplatesRequest (get template, template exists) - GetSettingsRequest - GetRepositoriesRequest - PendingClusterTasks Added parsing of the local flag where missing in Rest*Action. Updated SPEC adding local flag param where missing and added REST tests that contain use of the local flag where it was just added. Closes #3345
166 lines
3.6 KiB
YAML
166 lines
3.6 KiB
YAML
---
|
|
setup:
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
- do:
|
|
indices.create:
|
|
index: test_2
|
|
|
|
---
|
|
"Get /_settings":
|
|
|
|
- do:
|
|
indices.get_settings: {}
|
|
|
|
- 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: "5"}
|
|
- match: { test_2.settings.index.number_of_replicas: "1"}
|
|
|
|
---
|
|
"Get /{index}/_settings":
|
|
|
|
- do:
|
|
indices.get_settings:
|
|
index: test_1
|
|
|
|
- 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
|
|
|
|
- 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: '*'
|
|
|
|
- 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
|
|
|
|
- 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
|
|
|
|
- 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*'
|
|
|
|
- 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
|
|
|
|
- match: { test_1.settings.index.number_of_shards: "5"}
|
|
- match: { test_2.settings.index.number_of_shards: "5"}
|
|
- 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
|
|
|
|
- match: { test_1.settings.index.number_of_shards: "5"}
|
|
- match: { test_2.settings.index.number_of_shards: "5"}
|
|
- 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
|
|
|
|
- match: { test_1.settings.index.number_of_shards: "5"}
|
|
- match: { test_2.settings.index.number_of_shards: "5"}
|
|
- 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
|
|
|
|
- match: { test_1.settings.index.number_of_shards: "5"}
|
|
- match: { test_2.settings.index.number_of_shards: "5"}
|
|
- 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
|
|
|
|
- match: { test_2.settings.index.number_of_shards: "5"}
|
|
- is_false: test_1
|
|
- is_false: test_2.settings.index.number_of_replicas
|
|
|
|
---
|
|
"Get /_settings with local flag":
|
|
|
|
- do:
|
|
indices.get_settings:
|
|
local: true
|
|
|
|
- is_true: test_1
|
|
- is_true: test_2
|