From 8006e5cd153b7dae315b84801360454cf1a8f7db Mon Sep 17 00:00:00 2001 From: javanna Date: Wed, 27 Jan 2016 15:11:41 +0100 Subject: [PATCH] [TEST] re-enable and merge cluster settings REST tests We used to have a disabled test around cluster put settings as it left cluster settings behind without a way to remove them. That has been in fixed in the cluster put settings api, so the test can be re-enabled. --- .../test/cluster.put_settings/10_basic.yaml | 54 ++++++++++++++++--- .../test/cluster.put_settings/11_reset.yaml | 31 ----------- 2 files changed, 48 insertions(+), 37 deletions(-) delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/11_reset.yaml diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yaml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yaml index 9955f4519d6..41552f217be 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yaml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yaml @@ -1,10 +1,5 @@ --- -setup: - - skip: - version: "all" - reason: leaves transient metadata behind, need to fix it ---- -"Test put settings": +"Test put and reset transient settings": - do: cluster.put_settings: body: @@ -19,3 +14,50 @@ setup: flat_settings: true - match: {transient: {discovery.zen.minimum_master_nodes: "1"}} + + - do: + cluster.put_settings: + body: + transient: + discovery.zen.minimum_master_nodes: null + flat_settings: true + + - match: {transient: {}} + + - do: + cluster.get_settings: + flat_settings: true + + - match: {transient: {}} +--- +"Test put and reset persistent settings": + - do: + cluster.put_settings: + body: + persistent: + cluster.routing.allocation.disk.threshold_enabled: false + flat_settings: true + + - match: {persistent: {cluster.routing.allocation.disk.threshold_enabled: "false"}} + + - do: + cluster.get_settings: + flat_settings: true + + - match: {persistent: {cluster.routing.allocation.disk.threshold_enabled: "false"}} + + - do: + cluster.put_settings: + body: + persistent: + cluster.routing.allocation.disk.threshold_enabled: null + flat_settings: true + + - match: {persistent: {}} + + - do: + cluster.get_settings: + flat_settings: true + + - match: {persistent: {}} + diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/11_reset.yaml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/11_reset.yaml deleted file mode 100644 index 4162296532d..00000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/11_reset.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -"Test reset cluster settings": - - do: - cluster.put_settings: - body: - persistent: - cluster.routing.allocation.disk.threshold_enabled: false - flat_settings: true - - - match: {persistent: {cluster.routing.allocation.disk.threshold_enabled: "false"}} - - - do: - cluster.get_settings: - flat_settings: true - - - match: {persistent: {cluster.routing.allocation.disk.threshold_enabled: "false"}} - - - do: - cluster.put_settings: - body: - persistent: - cluster.routing.allocation.disk.threshold_enabled: null - flat_settings: true - - - match: {persistent: {}} - - - do: - cluster.get_settings: - flat_settings: true - - - match: {persistent: {}}