mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
[TEST] split tests with parent to pre/post 1.0 in the yaml test suite
See #4506 for details
This commit is contained in:
parent
d5efb54785
commit
076a24af14
@ -8,6 +8,7 @@
|
|||||||
mappings:
|
mappings:
|
||||||
test:
|
test:
|
||||||
_parent: { type: "foo" }
|
_parent: { type: "foo" }
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
cluster.health:
|
cluster.health:
|
||||||
wait_for_status: yellow
|
wait_for_status: yellow
|
||||||
@ -40,10 +41,3 @@
|
|||||||
- match: { fields._parent: "5"}
|
- match: { fields._parent: "5"}
|
||||||
- match: { fields._routing: "5"}
|
- match: { fields._routing: "5"}
|
||||||
|
|
||||||
- do:
|
|
||||||
catch: param
|
|
||||||
get:
|
|
||||||
index: test_1
|
|
||||||
type: test
|
|
||||||
id: 1
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
"Parent":
|
setup:
|
||||||
- skip:
|
- skip:
|
||||||
version: "0 - 0.90.2"
|
version: "0 - 0.90.2"
|
||||||
reason: "Parent not supported in exists https://github.com/elasticsearch/elasticsearch/issues/3276"
|
reason: "Parent not supported in exists https://github.com/elasticsearch/elasticsearch/issues/3276"
|
||||||
@ -15,6 +15,8 @@
|
|||||||
cluster.health:
|
cluster.health:
|
||||||
wait_for_status: yellow
|
wait_for_status: yellow
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent":
|
||||||
- do:
|
- do:
|
||||||
index:
|
index:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -32,8 +34,14 @@
|
|||||||
|
|
||||||
- is_true: ''
|
- is_true: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted pre 1.0":
|
||||||
|
|
||||||
|
- skip:
|
||||||
|
version: "1 - 999"
|
||||||
|
reason: "Pre 1.0 omitting a parent with exists would just use the id for routing, possibly resulting in 404"
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: param
|
|
||||||
exists:
|
exists:
|
||||||
index: test_1
|
index: test_1
|
||||||
type: test
|
type: test
|
||||||
@ -41,3 +49,21 @@
|
|||||||
|
|
||||||
- is_false: ''
|
- is_false: ''
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted post 1.0":
|
||||||
|
|
||||||
|
- skip:
|
||||||
|
version: "0 - 0.999"
|
||||||
|
reason: "When a parent is specified in the mapping it cannot be omitted"
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: request
|
||||||
|
exists:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
|
||||||
|
- is_false: ''
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
"Parent":
|
setup:
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
indices.create:
|
indices.create:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -20,6 +19,9 @@
|
|||||||
parent: 中文
|
parent: 中文
|
||||||
body: { foo: bar }
|
body: { foo: bar }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent":
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
get:
|
get:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -32,8 +34,27 @@
|
|||||||
- match: { fields._parent: 中文 }
|
- match: { fields._parent: 中文 }
|
||||||
- match: { fields._routing: 中文}
|
- match: { fields._routing: 中文}
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted post 1.0":
|
||||||
|
- skip:
|
||||||
|
version: "0 - 0.999"
|
||||||
|
reason: "Required parent has been introduced in 1.0"
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: param
|
catch: request
|
||||||
|
get:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted pre 1.0":
|
||||||
|
- skip:
|
||||||
|
version: "1 - 999"
|
||||||
|
reason: "Required parent has been introduced in 1.0"
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: missing
|
||||||
get:
|
get:
|
||||||
index: test_1
|
index: test_1
|
||||||
type: test
|
type: test
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
"Parent":
|
setup:
|
||||||
- skip:
|
- skip:
|
||||||
version: "0 - 0.90.0"
|
version: "0 - 0.90.0"
|
||||||
reason: "Get source not supported in pre 0.90.1 versions."
|
reason: "Get source not supported in pre 0.90.1 versions."
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
indices.create:
|
indices.create:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -22,6 +23,9 @@
|
|||||||
parent: 5
|
parent: 5
|
||||||
body: { foo: bar }
|
body: { foo: bar }
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent":
|
||||||
- do:
|
- do:
|
||||||
get_source:
|
get_source:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -31,8 +35,27 @@
|
|||||||
|
|
||||||
- match: { '': {foo: bar}}
|
- match: { '': {foo: bar}}
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted pre 1.0":
|
||||||
|
- skip:
|
||||||
|
version: "1 - 999"
|
||||||
|
reason: "Get source not supported in pre 0.90.1 versions."
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: param
|
catch: missing
|
||||||
|
get_source:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted post 1.0":
|
||||||
|
- skip:
|
||||||
|
version: "0 - 0.999"
|
||||||
|
reason: "Required parent has been introduced in 1.0"
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: request
|
||||||
get_source:
|
get_source:
|
||||||
index: test_1
|
index: test_1
|
||||||
type: test
|
type: test
|
||||||
|
@ -40,10 +40,3 @@
|
|||||||
- match: { fields._parent: "5"}
|
- match: { fields._parent: "5"}
|
||||||
- match: { fields._routing: "5"}
|
- match: { fields._routing: "5"}
|
||||||
|
|
||||||
- do:
|
|
||||||
catch: param
|
|
||||||
get:
|
|
||||||
index: test_1
|
|
||||||
type: test
|
|
||||||
id: 1
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
"Parent":
|
setup:
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
indices.create:
|
indices.create:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -12,6 +11,9 @@
|
|||||||
cluster.health:
|
cluster.health:
|
||||||
wait_for_status: yellow
|
wait_for_status: yellow
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent":
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: /RoutingMissingException/
|
catch: /RoutingMissingException/
|
||||||
update:
|
update:
|
||||||
@ -43,15 +45,6 @@
|
|||||||
- match: { fields._parent: "5"}
|
- match: { fields._parent: "5"}
|
||||||
- match: { fields._routing: "5"}
|
- match: { fields._routing: "5"}
|
||||||
|
|
||||||
- do:
|
|
||||||
catch: param
|
|
||||||
update:
|
|
||||||
index: test_1
|
|
||||||
type: test
|
|
||||||
id: 1
|
|
||||||
body:
|
|
||||||
doc: { foo: baz }
|
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
update:
|
update:
|
||||||
index: test_1
|
index: test_1
|
||||||
@ -64,3 +57,51 @@
|
|||||||
|
|
||||||
- match: { get.fields.foo: baz }
|
- match: { get.fields.foo: baz }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted post 1.0":
|
||||||
|
|
||||||
|
- skip:
|
||||||
|
version: "0 - 0.999"
|
||||||
|
reason: "Required parent has been introduced in 1.0"
|
||||||
|
|
||||||
|
- do:
|
||||||
|
index:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
parent: 5
|
||||||
|
body: { foo: bar }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: request
|
||||||
|
update:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
body:
|
||||||
|
doc: { foo: baz }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Parent omitted pre 1.0":
|
||||||
|
|
||||||
|
- skip:
|
||||||
|
version: "1 - 999"
|
||||||
|
reason: "Required parent has been introduced in 1.0"
|
||||||
|
|
||||||
|
- do:
|
||||||
|
index:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
parent: 5
|
||||||
|
body: { foo: bar }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: missing
|
||||||
|
update:
|
||||||
|
index: test_1
|
||||||
|
type: test
|
||||||
|
id: 1
|
||||||
|
body:
|
||||||
|
doc: { foo: baz }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user