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

27 lines
375 B
Go
Raw Normal View History

2015-07-30 15:43:22 +00:00
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()
}
}