From d57641a74754310e5743f2d0c20963b5d28d31d9 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 7 Jun 2017 15:00:17 +0200 Subject: [PATCH] Skip rest tests that use mutiple types in pure 6.x clusters (#24965) This change skips rest tests that use mutlitple types if the cluster is a pure 6.x cluster. This allows all indics to be created with a version less than 6.0 and that means we can safely use the `mapping.single_type` setting. Relates to #24961 --- .../test/indices.exists_type/10_basic.yml | 4 +- .../test/indices.get_mapping/10_basic.yml | 48 +++++++++---------- .../rest-api-spec/test/mget/15_ids.yml | 4 +- .../test/search.inner_hits/10_basic.yml | 5 +- 4 files changed, 30 insertions(+), 31 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 92fe2776669..fb56ab4e4d6 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 @@ -1,8 +1,8 @@ --- "Exists type": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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.create: 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 37acc10a482..eed35fe4226 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 @@ -23,8 +23,8 @@ setup: "Get /_mapping": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: {} @@ -38,8 +38,8 @@ setup: "Get /{index}/_mapping": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -54,8 +54,8 @@ setup: "Get /{index}/_mapping/_all": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -70,8 +70,8 @@ setup: "Get /{index}/_mapping/*": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -86,8 +86,8 @@ setup: "Get /{index}/_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -102,8 +102,8 @@ setup: "Get /{index}/_mapping/{type,type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -118,8 +118,8 @@ setup: "Get /{index}/_mapping/{type*}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -134,8 +134,8 @@ setup: "Get /_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -150,8 +150,8 @@ setup: "Get /_all/_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -167,8 +167,8 @@ setup: "Get /*/_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -184,8 +184,8 @@ setup: "Get /index,index/_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: @@ -200,8 +200,8 @@ setup: "Get /index*/_mapping/{type}": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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: 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 17e6d5b57fd..7827965ec69 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 @@ -1,8 +1,8 @@ --- "IDs": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 + 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.create: 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 45524366342..3c2eba90e6f 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 @@ -15,9 +15,8 @@ setup: --- "Nested inner hits": - skip: - version: " - 5.99.99" - reason: mapping.single_type was added in 6.0 - + 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: index: index: test