More TTL and shard zeroing

This commit is contained in:
Paul Bonser 2017-02-02 19:09:04 -06:00
parent a6663ce61d
commit 6c0739bec7

View File

@ -391,9 +391,7 @@ func (s *GoesTestSuite) TestIndexWithFieldsInStruct(c *C) {
}, },
} }
extraArgs := make(url.Values, 1) response, err := conn.Index(d, nil)
extraArgs.Set("ttl", "86400000")
response, err := conn.Index(d, extraArgs)
c.Assert(err, IsNil) c.Assert(err, IsNil)
expectedResponse := &Response{ expectedResponse := &Response{
@ -405,6 +403,7 @@ func (s *GoesTestSuite) TestIndexWithFieldsInStruct(c *C) {
} }
response.Raw = nil response.Raw = nil
response.Shards = Shard{}
c.Assert(response, DeepEquals, expectedResponse) c.Assert(response, DeepEquals, expectedResponse)
} }
@ -428,9 +427,7 @@ func (s *GoesTestSuite) TestIndexWithFieldsNotInMapOrStruct(c *C) {
Fields: "test", Fields: "test",
} }
extraArgs := make(url.Values, 1) _, err = conn.Index(d, nil)
extraArgs.Set("ttl", "86400000")
_, err = conn.Index(d, extraArgs)
c.Assert(err, Not(IsNil)) c.Assert(err, Not(IsNil))
} }