update vendor

This commit is contained in:
deepzz0
2017-07-08 12:16:15 +08:00
parent 8dc73fd67c
commit 3923bc70f1
63 changed files with 1590 additions and 216 deletions

View File

@@ -46,6 +46,14 @@ func dialTestConn(r io.Reader, w io.Writer) redis.DialOption {
})
}
type durationArg struct {
time.Duration
}
func (t durationArg) RedisArg() interface{} {
return t.Seconds()
}
var writeTests = []struct {
args []interface{}
expected string
@@ -82,6 +90,10 @@ var writeTests = []struct {
[]interface{}{"SET", "key", nil},
"*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$0\r\n\r\n",
},
{
[]interface{}{"SET", "key", durationArg{time.Minute}},
"*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$2\r\n60\r\n",
},
{
[]interface{}{"ECHO", true, false},
"*3\r\n$4\r\nECHO\r\n$1\r\n1\r\n$1\r\n0\r\n",
@@ -447,7 +459,7 @@ var dialErrors = []struct {
"localhost",
"invalid redis URL scheme",
},
// The error message for invalid hosts is diffferent in different
// The error message for invalid hosts is different in different
// versions of Go, so just check that there is an error message.
{
"redis://weird url",