[TEST] Corrected YAML syntax in mget/70_source_filtering
and broke it up into multiple tests which are easier to debug
This commit is contained in:
parent
e5daab0b6b
commit
cf795cfe4c
|
@ -1,9 +1,4 @@
|
|||
---
|
||||
"Source filtering":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
setup:
|
||||
- do:
|
||||
index:
|
||||
index: test_1
|
||||
|
@ -16,20 +11,30 @@
|
|||
type: test
|
||||
id: 2
|
||||
body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 }
|
||||
|
||||
---
|
||||
"Source filtering - true/false":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
body:
|
||||
{ docs:
|
||||
[ { _index: "test_1", _type: "test", _id: "1", _source: false },
|
||||
{ _index: "test_1", _type: "test", _id: "2", _source: true }
|
||||
]
|
||||
}
|
||||
docs:
|
||||
- { _index: "test_1", _type: "test", _id: "1", _source: false }
|
||||
- { _index: "test_1", _type: "test", _id: "2", _source: true }
|
||||
|
||||
- match: { docs.0._id: "1" }
|
||||
- is_false: docs.0._source
|
||||
- match: { docs.1._id: "2" }
|
||||
- is_true: docs.1._source
|
||||
|
||||
---
|
||||
"Source filtering - include field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
|
@ -42,6 +47,12 @@
|
|||
- match: { docs.1._source: { include: { field1: v1 }} }
|
||||
|
||||
|
||||
---
|
||||
"Source filtering - include nested field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
body:
|
||||
|
@ -52,6 +63,12 @@
|
|||
- match: { docs.0._source: { include: { field1: v1 }} }
|
||||
- match: { docs.1._source: { include: { field1: v1 }} }
|
||||
|
||||
---
|
||||
"Source filtering - exclude field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
body:
|
||||
|
@ -60,6 +77,13 @@
|
|||
|
||||
- match: { docs.0._source: { include: { field1: v1 }} }
|
||||
|
||||
---
|
||||
"Source filtering - ids and true/false":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
|
||||
- do:
|
||||
mget:
|
||||
_source: false
|
||||
|
@ -76,6 +100,12 @@
|
|||
- is_true: docs.0._source
|
||||
- is_true: docs.1._source
|
||||
|
||||
---
|
||||
"Source filtering - ids and include field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
_source: include.field1
|
||||
|
@ -84,6 +114,12 @@
|
|||
- match: { docs.0._source: { include: { field1: v1 }} }
|
||||
- match: { docs.1._source: { include: { field1: v1 }} }
|
||||
|
||||
---
|
||||
"Source filtering - ids and include nested field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
_source_include: "include.field1,count"
|
||||
|
@ -92,6 +128,12 @@
|
|||
- match: { docs.0._source: { include: { field1: v1 }, count: 1} }
|
||||
- match: { docs.1._source: { include: { field1: v1 }, count: 1} }
|
||||
|
||||
---
|
||||
"Source filtering - ids and exclude field":
|
||||
- skip:
|
||||
version: "0 - 0.90.999"
|
||||
reason: "source filtering is not supported in pre 1.0 versions."
|
||||
|
||||
- do:
|
||||
mget:
|
||||
_source_include: include
|
||||
|
|
Loading…
Reference in New Issue