From 953759da481b990c98006a64017d3d4cc4096399 Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Wed, 24 Jun 2015 10:32:01 -0500 Subject: [PATCH] Handle variance in refresh count between ES versions --- goes_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/goes_test.go b/goes_test.go index 944205b..868b5fe 100644 --- a/goes_test.go +++ b/goes_test.go @@ -799,9 +799,11 @@ func (s *GoesTestSuite) TestIndexStatus(c *C) { primarySizeInBytes := response.Indices[indexName].Index["primary_size_in_bytes"].(float64) sizeInBytes := response.Indices[indexName].Index["size_in_bytes"].(float64) + refreshTotal := response.Indices[indexName].Refresh["total"].(float64) c.Assert(primarySizeInBytes > 0, Equals, true) c.Assert(sizeInBytes > 0, Equals, true) + c.Assert(refreshTotal > 0, Equals, true) expectedIndices := map[string]IndexStatus{ indexName: { @@ -827,7 +829,7 @@ func (s *GoesTestSuite) TestIndexStatus(c *C) { "total_size_in_bytes": float64(0), }, Refresh: map[string]interface{}{ - "total": float64(1), + "total": refreshTotal, "total_time_in_millis": float64(0), }, Flush: map[string]interface{}{