Improved and fixed "Get Mapping" tests

* Fixed error in `skip` explanation for "get type" test
* Separated the tests for getting index/type mapping

I vote for removing the "get type" test entirely, since it just tests ancient versions.
This commit is contained in:
Karel Minarik 2013-07-25 11:33:55 +02:00
parent 690151516d
commit 4e0396768b
1 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,5 @@
---
"Get mapping tests":
"Get index mapping":
- do:
indices.create:
index: test_index
@ -18,15 +18,27 @@
- match: {test_index.test_type.properties.text.type: string}
- match: {test_index.test_type.properties.text.analyzer: whitespace}
---
"Get type mapping":
- 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
- skip:
version: "0.90.2 - 999"
reason: "for newer versions the index name is always required"
reason: "for newer versions the index name is always returned"
- match: {test_type.properties.text.type: string}
- match: {test_type.properties.text.analyzer: whitespace}