[TEST] split tests with parent to pre/post 1.0 in the yaml test suite

See #4506 for details
This commit is contained in:
Honza Král 2014-01-02 19:33:19 +01:00
parent d5efb54785
commit 076a24af14
6 changed files with 130 additions and 32 deletions

View File

@ -8,6 +8,7 @@
mappings:
test:
_parent: { type: "foo" }
- do:
cluster.health:
wait_for_status: yellow
@ -40,10 +41,3 @@
- match: { fields._parent: "5"}
- match: { fields._routing: "5"}
- do:
catch: param
get:
index: test_1
type: test
id: 1

View File

@ -1,5 +1,5 @@
---
"Parent":
setup:
- skip:
version: "0 - 0.90.2"
reason: "Parent not supported in exists https://github.com/elasticsearch/elasticsearch/issues/3276"
@ -15,6 +15,8 @@
cluster.health:
wait_for_status: yellow
---
"Parent":
- do:
index:
index: test_1
@ -32,8 +34,14 @@
- 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:
catch: param
exists:
index: test_1
type: test
@ -41,3 +49,21 @@
- 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: ''

View File

@ -1,6 +1,5 @@
---
"Parent":
setup:
- do:
indices.create:
index: test_1
@ -20,6 +19,9 @@
parent: 中文
body: { foo: bar }
---
"Parent":
- do:
get:
index: test_1
@ -32,8 +34,27 @@
- match: { fields._parent: 中文 }
- match: { fields._routing: 中文}
---
"Parent omitted post 1.0":
- skip:
version: "0 - 0.999"
reason: "Required parent has been introduced in 1.0"
- 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:
index: test_1
type: test

View File

@ -1,8 +1,9 @@
---
"Parent":
setup:
- skip:
version: "0 - 0.90.0"
reason: "Get source not supported in pre 0.90.1 versions."
- do:
indices.create:
index: test_1
@ -22,6 +23,9 @@
parent: 5
body: { foo: bar }
---
"Parent":
- do:
get_source:
index: test_1
@ -31,8 +35,27 @@
- match: { '': {foo: bar}}
---
"Parent omitted pre 1.0":
- skip:
version: "1 - 999"
reason: "Get source not supported in pre 0.90.1 versions."
- 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:
index: test_1
type: test

View File

@ -40,10 +40,3 @@
- match: { fields._parent: "5"}
- match: { fields._routing: "5"}
- do:
catch: param
get:
index: test_1
type: test
id: 1

View File

@ -1,6 +1,5 @@
---
"Parent":
setup:
- do:
indices.create:
index: test_1
@ -12,6 +11,9 @@
cluster.health:
wait_for_status: yellow
---
"Parent":
- do:
catch: /RoutingMissingException/
update:
@ -43,15 +45,6 @@
- match: { fields._parent: "5"}
- match: { fields._routing: "5"}
- do:
catch: param
update:
index: test_1
type: test
id: 1
body:
doc: { foo: baz }
- do:
update:
index: test_1
@ -64,3 +57,51 @@
- 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 }