diff options
author | Simon Willnauer <simonw@apache.org> | 2017-06-25 12:25:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-25 12:25:41 +0200 |
commit | 4e4a104f4aaed2dc5166a9b2b1b61fc48945b823 (patch) | |
tree | 712f7ce78d56999a9925429385b56b6a3d3ce6f6 /rest-api-spec/src/main | |
parent | 43c190339a7dccf6eaa6c2bbe52bb5bfd3339605 (diff) |
Remove remaining `index.mapper.single_type` setting usage from tests (#25388)
This change removes the remaining explicitly specified `index.mapper.single_type`
settings from tests in order to allow the removal of the setting.
This is the already approved part of #25375 broken out to simplfiy reviews on
Diffstat (limited to 'rest-api-spec/src/main')
5 files changed, 236 insertions, 116 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.exists_type/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.exists_type/10_basic.yml index fb56ab4e4d..278fd1ca8e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.exists_type/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.exists_type/10_basic.yml @@ -2,14 +2,12 @@ "Exists type": - skip: version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards + reason: multiple types are not supported on 6.x indices onwards - do: indices.create: index: test_1 body: - settings: - mapping.single_type: false mappings: type_1: {} type_2: {} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml index b17f2512b6..90bb2747a7 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml @@ -4,21 +4,14 @@ setup: indices.create: index: test_1 body: - settings: - mapping.single_type: false mappings: - type_1: {} - type_2: {} + doc: {} - do: indices.create: index: test_2 body: - settings: - mapping.single_type: false mappings: - type_2: {} - type_3: {} - + doc: {} --- "Get /{index}/_mapping with empty mappings": @@ -35,191 +28,117 @@ setup: --- "Get /_mapping": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: {} - - is_true: test_1.mappings.type_1 - - is_true: test_1.mappings.type_2 - - is_true: test_2.mappings.type_2 - - is_true: test_2.mappings.type_3 + - is_true: test_1.mappings.doc + - is_true: test_2.mappings.doc --- "Get /{index}/_mapping": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1 - - is_true: test_1.mappings.type_1 - - is_true: test_1.mappings.type_2 + - is_true: test_1.mappings.doc - is_false: test_2 --- "Get /{index}/_mapping/_all": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1 type: _all - - is_true: test_1.mappings.type_1 - - is_true: test_1.mappings.type_2 + - is_true: test_1.mappings.doc - is_false: test_2 --- "Get /{index}/_mapping/*": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1 type: '*' - - is_true: test_1.mappings.type_1 - - is_true: test_1.mappings.type_2 + - is_true: test_1.mappings.doc - is_false: test_2 --- "Get /{index}/_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1 - type: type_1 + type: doc - - is_false: test_1.mappings.type_2 - - is_false: test_2 - ---- -"Get /{index}/_mapping/{type,type}": - - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - - do: - indices.get_mapping: - index: test_1 - type: type_1,type_2 - - - is_true: test_1.mappings.type_1 - - is_true: test_1.mappings.type_2 + - is_true: test_1.mappings.doc - is_false: test_2 --- "Get /{index}/_mapping/{type*}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1 - type: '*2' + type: 'd*' - - is_true: test_1.mappings.type_2 - - is_false: test_1.mappings.type_1 + - is_true: test_1.mappings.doc - is_false: test_2 --- "Get /_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: - type: type_2 + type: doc - - is_true: test_1.mappings.type_2 - - is_true: test_2.mappings.type_2 - - is_false: test_1.mappings.type_1 - - is_false: test_2.mappings.type_3 + - is_true: test_1.mappings.doc + - is_true: test_2.mappings.doc --- "Get /_all/_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: _all - type: type_2 + type: doc - - is_true: test_1.mappings.type_2 - - is_true: test_2.mappings.type_2 - - is_false: test_1.mappings.type_1 - - is_false: test_2.mappings.type_3 + - is_true: test_1.mappings.doc + - is_true: test_2.mappings.doc --- "Get /*/_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: '*' - type: type_2 + type: doc - - is_true: test_1.mappings.type_2 - - is_true: test_2.mappings.type_2 - - is_false: test_1.mappings.type_1 - - is_false: test_2.mappings.type_3 + - is_true: test_1.mappings.doc + - is_true: test_2.mappings.doc --- "Get /index,index/_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: test_1,test_2 - type: type_2 + type: doc - - is_true: test_1.mappings.type_2 - - is_true: test_2.mappings.type_2 - - is_false: test_2.mappings.type_3 + - is_true: test_1.mappings.doc + - is_true: test_2.mappings.doc --- "Get /index*/_mapping/{type}": - - skip: - version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards - - do: indices.get_mapping: index: '*2' - type: type_2 + type: doc - - is_true: test_2.mappings.type_2 + - is_true: test_2.mappings.doc - is_false: test_1 - - is_false: test_2.mappings.type_3 diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_legacy_multi_type.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_legacy_multi_type.yml new file mode 100644 index 0000000000..9b36ac1535 --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_legacy_multi_type.yml @@ -0,0 +1,208 @@ +--- +setup: + - do: + indices.create: + index: test_1 + body: + mappings: + type_1: {} + type_2: {} + - do: + indices.create: + index: test_2 + body: + mappings: + type_2: {} + type_3: {} + +--- +"Get /_mapping": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: {} + + - is_true: test_1.mappings.type_1 + - is_true: test_1.mappings.type_2 + - is_true: test_2.mappings.type_2 + - is_true: test_2.mappings.type_3 + +--- +"Get /{index}/_mapping": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + + - is_true: test_1.mappings.type_1 + - is_true: test_1.mappings.type_2 + - is_false: test_2 + + +--- +"Get /{index}/_mapping/_all": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + type: _all + + - is_true: test_1.mappings.type_1 + - is_true: test_1.mappings.type_2 + - is_false: test_2 + +--- +"Get /{index}/_mapping/*": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + type: '*' + + - is_true: test_1.mappings.type_1 + - is_true: test_1.mappings.type_2 + - is_false: test_2 + +--- +"Get /{index}/_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + type: type_1 + + - is_false: test_1.mappings.type_2 + - is_false: test_2 + +--- +"Get /{index}/_mapping/{type,type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + type: type_1,type_2 + + - is_true: test_1.mappings.type_1 + - is_true: test_1.mappings.type_2 + - is_false: test_2 + +--- +"Get /{index}/_mapping/{type*}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1 + type: '*2' + + - is_true: test_1.mappings.type_2 + - is_false: test_1.mappings.type_1 + - is_false: test_2 + +--- +"Get /_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + type: type_2 + + - is_true: test_1.mappings.type_2 + - is_true: test_2.mappings.type_2 + - is_false: test_1.mappings.type_1 + - is_false: test_2.mappings.type_3 + +--- +"Get /_all/_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: _all + type: type_2 + + - is_true: test_1.mappings.type_2 + - is_true: test_2.mappings.type_2 + - is_false: test_1.mappings.type_1 + - is_false: test_2.mappings.type_3 + +--- +"Get /*/_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: '*' + type: type_2 + + - is_true: test_1.mappings.type_2 + - is_true: test_2.mappings.type_2 + - is_false: test_1.mappings.type_1 + - is_false: test_2.mappings.type_3 + +--- +"Get /index,index/_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: test_1,test_2 + type: type_2 + + - is_true: test_1.mappings.type_2 + - is_true: test_2.mappings.type_2 + - is_false: test_2.mappings.type_3 + +--- +"Get /index*/_mapping/{type}": + + - skip: + version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node + reason: multiple types are not supported on 6.x indices onwards + + - do: + indices.get_mapping: + index: '*2' + type: type_2 + + - is_true: test_2.mappings.type_2 + - is_false: test_1 + - is_false: test_2.mappings.type_3 diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/15_ids.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/15_ids.yml index 7827965ec6..1dd851554b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/15_ids.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/15_ids.yml @@ -2,14 +2,11 @@ "IDs": - skip: version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards + reason: multiple types are not supported on 6.x indices onwards - do: indices.create: index: test_1 - body: - settings: - mapping.single_type: false - do: index: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml index 3c2eba90e6..e90fda9fe0 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml @@ -4,8 +4,6 @@ setup: indices.create: index: test body: - settings: - mapping.single_type: false mappings: type_1: properties: @@ -16,7 +14,7 @@ setup: "Nested inner hits": - skip: version: "5.99.99 - "# this will only run in a mixed cluster environment with at least 1 5.x node - reason: mapping.single_type can not be changed on 6.x indices onwards + reason: multiple types are not supported on 6.x indices onwards - do: index: index: test |