From 28784db09c8a090f37ebd2d17bf54c85177fb05a Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Thu, 2 Feb 2017 18:19:27 -0600 Subject: [PATCH] Be more general about error to support ES 5.x --- goes_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/goes_test.go b/goes_test.go index 0643dbd..bd2bab8 100644 --- a/goes_test.go +++ b/goes_test.go @@ -151,9 +151,10 @@ func (s *GoesTestSuite) TestDeleteIndexInexistantIndex(c *C) { conn := NewClient(ESHost, ESPort) resp, err := conn.DeleteIndex("foobar") - c.Assert(err.Error(), Equals, "[404] IndexMissingException[[foobar] missing]") + c.Assert(err.Error(), Matches, "\\[404\\] .*foobar.*") resp.Raw = nil // Don't make us have to duplicate this. - c.Assert(resp, DeepEquals, &Response{Status: 404, Error: "IndexMissingException[[foobar] missing]"}) + c.Assert(resp.Status, Equals, uint64(404)) + c.Assert(resp.Error, Matches, ".*foobar.*") } func (s *GoesTestSuite) TestDeleteIndexExistingIndex(c *C) {