This repository was archived by the owner on Apr 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1582,7 +1582,7 @@ type ClusterAllocationExplainRequest struct {
15821582 Primary bool `json:"primary,omitempty"`
15831583
15841584 // Specifies the ID of the shard that you would like an explanation for.
1585- Shard string `json:"shard,omitempty"`
1585+ Shard * int `json:"shard,omitempty"`
15861586}
15871587
15881588// ClusterAllocationExplain provides an explanation for a shard’s current allocation.
Original file line number Diff line number Diff line change @@ -2103,6 +2103,7 @@ func TestGetNodesHotThreads(t *testing.T) {
21032103}
21042104
21052105func TestClusterAllocationExplain (t * testing.T ) {
2106+ shardID := 0
21062107 tests := []struct {
21072108 name string
21082109 request * ClusterAllocationExplainRequest
@@ -2138,9 +2139,9 @@ func TestClusterAllocationExplain(t *testing.T) {
21382139 {
21392140 name : "with shard set" ,
21402141 request : & ClusterAllocationExplainRequest {
2141- Shard : "test-shard" ,
2142+ Shard : & shardID ,
21422143 },
2143- expectedBody : `{"shard":"test-shard" }` ,
2144+ expectedBody : `{"shard":0 }` ,
21442145 },
21452146 {
21462147 name : "with pretty output" ,
You can’t perform that action at this time.
0 commit comments