Explorar el Código

Be more general about error to support ES 5.x

tags/v1.2.2
Paul Bonser hace 7 años
padre
commit
28784db09c
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. +3
    -2
      goes_test.go

+ 3
- 2
goes_test.go Ver fichero

@@ -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) {


Cargando…
Cancelar
Guardar