1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-08 22:20:05 +00:00
cloudkeys-go/vendor/github.com/xuyu/goredis/connection_test.go

26 lines
375 B
Go

package goredis
import (
"testing"
)
func TestEcho(t *testing.T) {
msg := "message"
if ret, err := r.Echo(msg); err != nil {
t.Error(err)
} else if ret != msg {
t.Errorf("echo %s\n%s", msg, ret)
}
}
func TestPing(t *testing.T) {
if err := r.Ping(); err != nil {
t.Error(err)
}
}
func BenchmarkPing(b *testing.B) {
for i := 0; i < b.N; i++ {
r.Ping()
}
}