Browse Source

[TEST] Move version skip to setup in Indices.GetMapping#70_legacy_multi_type (#25816)

Since the setup attempts to create an index with two types, and the setup runs before any test,
this will fail on versions 6.0+ before it has a chance to check the skip in each individual
test.  Moving to the setup resolves this issue.
Zachary Tong 8 years ago
parent
commit
caef6cc128

+ 5 - 48
rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_legacy_multi_type.yml

@@ -1,5 +1,10 @@
 ---
 ---
 setup:
 setup:
+
+  - 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:
   - do:
         indices.create:
         indices.create:
           index: test_1
           index: test_1
@@ -18,10 +23,6 @@ setup:
 ---
 ---
 "Get /_mapping":
 "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:
  - do:
     indices.get_mapping: {}
     indices.get_mapping: {}
 
 
@@ -33,10 +34,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -49,10 +46,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping/_all":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -65,10 +58,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping/*":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -81,10 +70,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -96,10 +81,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping/{type,type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -112,10 +93,6 @@ setup:
 ---
 ---
 "Get /{index}/_mapping/{type*}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1
         index: test_1
@@ -128,10 +105,6 @@ setup:
 ---
 ---
 "Get /_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         type: type_2
         type: type_2
@@ -144,10 +117,6 @@ setup:
 ---
 ---
 "Get /_all/_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: _all
         index: _all
@@ -161,10 +130,6 @@ setup:
 ---
 ---
 "Get /*/_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: '*'
         index: '*'
@@ -178,10 +143,6 @@ setup:
 ---
 ---
 "Get /index,index/_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: test_1,test_2
         index: test_1,test_2
@@ -194,10 +155,6 @@ setup:
 ---
 ---
 "Get /index*/_mapping/{type}":
 "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:
  - do:
     indices.get_mapping:
     indices.get_mapping:
         index: '*2'
         index: '*2'