remove tls unit test case

This commit is contained in:
xbkaishui
2020-07-22 15:08:32 +08:00
parent 208bdffdf7
commit 646280a6a9

View File

@ -28,6 +28,7 @@ var (
Db: 1,
}
//demo for tls config
tlsConfig = gredis.Config{
Host: "127.0.0.1",
Port: 6379,
@ -390,27 +391,3 @@ func Test_Auto_MarshalSlice(t *testing.T) {
t.Assert(users2, users1)
})
}
func Test_Conn_TLS(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
redis := gredis.New(tlsConfig)
defer redis.Close()
conn := redis.Conn()
defer conn.Close()
key := gconv.String(gtime.TimestampNano())
value := []byte("v")
r, err := conn.Do("SET", key, value)
t.Assert(err, nil)
r, err = conn.Do("GET", key)
t.Assert(err, nil)
t.Assert(r, value)
_, err = conn.Do("DEL", key)
t.Assert(err, nil)
r, err = conn.Do("GET", key)
t.Assert(err, nil)
t.Assert(r, nil)
})
}