From 273f50efb6a023935550b1c1eb4765c3fd8b06ed Mon Sep 17 00:00:00 2001 From: atyron Date: Thu, 29 Sep 2016 18:43:24 +0300 Subject: [PATCH] Fixed panic in TestIndexStatus --- goes_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goes_test.go b/goes_test.go index 418f197..0b11c49 100644 --- a/goes_test.go +++ b/goes_test.go @@ -835,7 +835,8 @@ func (s *GoesTestSuite) TestIndexStatus(c *C) { expectedShards := Shard{Total: 2, Successful: 1, Failed: 0} c.Assert(response.Shards, Equals, expectedShards) - primarySizeInBytes := response.Indices[indexName].Index["primary_size_in_bytes"].(float64) + jsonPrimarySizeInBytes, _ := response.Indices[indexName].Index["primary_size_in_bytes"].(json.Number) + primarySizeInBytes, _ := jsonPrimarySizeInBytes.Float64() sizeInBytes := response.Indices[indexName].Index["size_in_bytes"].(float64) refreshTotal := response.Indices[indexName].Refresh["total"].(float64)