Core: fix upgrade response serialization
This commit is contained in:
parent
3db9caf7a1
commit
6980286ba4
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
"Basic test for upgrade indices":
|
||||
|
||||
- do:
|
||||
indices.create:
|
||||
index: test_index
|
||||
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
|
||||
- do:
|
||||
indices.upgrade:
|
||||
index: test_index
|
||||
|
||||
- match: {upgraded_indices.test_index: '/(\d\.)+\d/'}
|
|
@ -85,7 +85,7 @@ public class RestUpgradeAction extends BaseRestHandler {
|
|||
public RestResponse buildResponse(UpgradeResponse response, XContentBuilder builder) throws Exception {
|
||||
builder.startObject();
|
||||
buildBroadcastShardsHeader(builder, request, response);
|
||||
builder.startArray("upgraded_indices");
|
||||
builder.startObject("upgraded_indices");
|
||||
for (Map.Entry<String, String> entry : response.versions().entrySet()) {
|
||||
builder.field(entry.getKey(), entry.getValue(), XContentBuilder.FieldCaseConversion.NONE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue