Browse Source

Harmonize include_defaults tests (#30700)

This PR breaks the include_defaults functionality of the get settings API into its own
test, which is skipped for mixed-mode clusters containing pre-6.4 nodes.
Tom Callahan 7 years ago
parent
commit
36fbb4cb48

+ 28 - 0
rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_settings/30_defaults.yml

@@ -0,0 +1,28 @@
+---
+setup:
+  - do:
+      indices.create:
+        body:
+          settings:
+            index:
+              number_of_shards: 1
+              number_of_replicas: 1
+        index: test-index
+---
+Test retrieval of default settings:
+  - skip:
+      version: " - 6.3.99"
+      reason: include_defaults will not work in mixed-mode clusters containing nodes pre-6.4
+  - do:
+      indices.get_settings:
+        flat_settings: true
+        index: test-index
+  - is_false:
+      test-index.settings.index\.refresh_interval
+  - do:
+      indices.get_settings:
+        include_defaults: true
+        flat_settings: true
+        index: test-index
+  - match:
+      test-index.defaults.index\.refresh_interval: "1s"

+ 0 - 12
rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_settings/11_reset.yml

@@ -23,15 +23,3 @@ Test reset index settings:
       indices.get_settings:
         flat_settings: false
   - is_false: test-index.settings.index\.refresh_interval
-
-# Disabled until https://github.com/elastic/elasticsearch/pull/29229 is back-ported
-# That PR changed the execution path of index settings default to be on the master
-# until the PR is back-ported the old master will not return default settings.
-#
-#  - do:
-#      indices.get_settings:
-#        include_defaults: true
-#        flat_settings: true
-#        index: test-index
-#  - match:
-#      test-index.defaults.index\.refresh_interval: "1s"