mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
tests for get_mapping
This commit is contained in:
parent
84289de744
commit
59af51838a
28
rest-api-spec/test/indices.get_mapping/10_basic.yaml
Normal file
28
rest-api-spec/test/indices.get_mapping/10_basic.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
"Get mapping tests":
|
||||
- do:
|
||||
indices.create:
|
||||
index: test_index
|
||||
body:
|
||||
mappings:
|
||||
test_type:
|
||||
properties:
|
||||
text:
|
||||
type: string
|
||||
analyzer: whitespace
|
||||
|
||||
- do:
|
||||
indices.get_mapping:
|
||||
index: test_index
|
||||
type: test_type
|
||||
|
||||
- match: {test_type.properties.text.type: string}
|
||||
- match: {test_type.properties.text.analyzer: whitespace}
|
||||
|
||||
- do:
|
||||
indices.get_mapping:
|
||||
index: test_index
|
||||
|
||||
- match: {test_index.test_type.properties.text.type: string}
|
||||
- match: {test_index.test_type.properties.text.analyzer: whitespace}
|
||||
|
19
rest-api-spec/test/indices.get_mapping/20_missing_type.yaml
Normal file
19
rest-api-spec/test/indices.get_mapping/20_missing_type.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
"Raise 404 when type doesn't exist":
|
||||
- do:
|
||||
indices.create:
|
||||
index: test_index
|
||||
body:
|
||||
mappings:
|
||||
test_type:
|
||||
properties:
|
||||
text:
|
||||
type: string
|
||||
analyzer: whitespace
|
||||
|
||||
- do:
|
||||
catch: missing
|
||||
indices.get_mapping:
|
||||
index: test_index
|
||||
type: not_test_type
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
"Raise 404 when index doesn't exist":
|
||||
- do:
|
||||
catch: missing
|
||||
indices.get_mapping:
|
||||
index: test_index
|
||||
type: not_test_type
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user