mirror of https://github.com/go-redis/redis.git
Use IfaceSliceReq for CONFIG GET because it can return (nil) on Redis 2.4.*.
This commit is contained in:
parent
9764065750
commit
583e901221
|
@ -950,8 +950,8 @@ func (c *Client) ClientList() *StringReq {
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) ConfigGet(parameter string) *StringSliceReq {
|
func (c *Client) ConfigGet(parameter string) *IfaceSliceReq {
|
||||||
req := NewStringSliceReq("CONFIG", "GET", parameter)
|
req := NewIfaceSliceReq("CONFIG", "GET", parameter)
|
||||||
c.Process(req)
|
c.Process(req)
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
|
@ -2544,7 +2544,7 @@ func (t *RedisTest) TestCmdConfigSet(c *C) {
|
||||||
c.Assert(configGet.Val(), HasLen, 2)
|
c.Assert(configGet.Val(), HasLen, 2)
|
||||||
c.Assert(configGet.Val()[0], Equals, "maxmemory")
|
c.Assert(configGet.Val()[0], Equals, "maxmemory")
|
||||||
|
|
||||||
configSet := t.client.ConfigSet("maxmemory", configGet.Val()[1])
|
configSet := t.client.ConfigSet("maxmemory", configGet.Val()[1].(string))
|
||||||
c.Assert(configSet.Err(), IsNil)
|
c.Assert(configSet.Err(), IsNil)
|
||||||
c.Assert(configSet.Val(), Equals, "OK")
|
c.Assert(configSet.Val(), Equals, "OK")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue