mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-27 18:38:41 +00:00
Added tests for default document type in get
and get_source
APIs
This commit is contained in:
parent
e784cff1b0
commit
cb4b04e49f
rest-api-spec/test
20
rest-api-spec/test/get/15_default_values.yaml
Normal file
20
rest-api-spec/test/get/15_default_values.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
"Default values":
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: test_1
|
||||
type: test
|
||||
id: 1
|
||||
body: { "foo": "bar" }
|
||||
|
||||
- do:
|
||||
get:
|
||||
index: test_1
|
||||
id: 1
|
||||
|
||||
- match: { _index: test_1 }
|
||||
- match: { _type: test }
|
||||
- match: { _id: '1' }
|
||||
- match: { _source: { foo: "bar" } }
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
- match: { _index: test_1 }
|
||||
- match: { _type: test }
|
||||
- match: { _id: "1" }
|
||||
- match: { _id: '1' }
|
||||
- match: { fields.foo: bar }
|
||||
- is_false: _source
|
||||
|
||||
|
16
rest-api-spec/test/get_source/15_default_values.yaml
Normal file
16
rest-api-spec/test/get_source/15_default_values.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
"Default values":
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: test_1
|
||||
type: test
|
||||
id: 1
|
||||
body: { "foo": "bar" }
|
||||
|
||||
- do:
|
||||
get_source:
|
||||
index: test_1
|
||||
id: 1
|
||||
|
||||
- match: { '': { foo: bar } }
|
Loading…
x
Reference in New Issue
Block a user