Fix flat_settings REST parameter

* Get XContent params from request in Nodes rest actions
* Adding test for nodes info rest api
This commit is contained in:
Alexander Kazakov 2016-06-16 17:03:51 +03:00 committed by Nik Everett
parent b22c526b34
commit 9eea1b6833
2 changed files with 20 additions and 1 deletions

View File

@ -275,7 +275,7 @@ public class RestActions {
@Override
public RestResponse buildResponse(NodesResponse response, XContentBuilder builder) throws Exception {
return RestActions.nodesResponse(builder, ToXContent.EMPTY_PARAMS, response);
return RestActions.nodesResponse(builder, channel.request(), response);
}
}

View File

@ -0,0 +1,19 @@
---
"node_info test flat_settings":
- do:
cluster.state: {}
- set: { master_node: master }
- do:
nodes.info:
metric: [ settings ]
- match : { nodes.$master.settings.client.type: node }
- do:
nodes.info:
metric: [ settings ]
flat_settings: true
- match : { nodes.$master.settings.client\.type: node }