rest-api-spec.test.indices.get_template.10_basic.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-spec Show documentation
Show all versions of rest-api-spec Show documentation
OpenSearch subproject :rest-api-spec
The newest version!
setup:
- do:
indices.put_template:
name: test
body:
index_patterns: test-*
settings:
number_of_shards: 1
number_of_replicas: 0
mappings:
properties:
field:
type: keyword
---
"Get template":
- do:
indices.get_template:
name: test
- match: {test.index_patterns: ["test-*"]}
- match: {test.settings: {index: {number_of_shards: '1', number_of_replicas: '0'}}}
- match: {test.mappings: {properties: {field: {type: keyword}}}}
---
"Get template with no mappings":
- do:
indices.put_template:
name: test_no_mappings
body:
index_patterns: test-*
settings:
number_of_shards: 1
number_of_replicas: 0
- do:
indices.get_template:
name: test_no_mappings
- match: {test_no_mappings.index_patterns: ["test-*"]}
- match: {test_no_mappings.settings: {index: {number_of_shards: '1', number_of_replicas: '0'}}}
- match: {test_no_mappings.mappings: {}}
---
"Get all templates":
- do:
indices.put_template:
name: test2
body:
index_patterns: test2-*
settings:
number_of_shards: 1
- do:
indices.get_template: {}
- match: {test.index_patterns: ["test-*"]}
- match: {test2.index_patterns: ["test2-*"]}
---
"Get template with local flag":
- do:
indices.get_template:
name: test
local: true
- is_true: test
---
"Get template with flat settings and master timeout":
- skip:
features: allowed_warnings
- do:
allowed_warnings:
- "Parameter [master_timeout] is deprecated and will be removed in 3.0. To support inclusive language, please use [cluster_manager_timeout] instead."
indices.get_template:
name: test
flat_settings: true
master_timeout: 1m
- match: {test.settings: {index.number_of_shards: '1', index.number_of_replicas: '0'}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy