mediocre-go-lib/mdb/mredis/redis_test.go

23 lines
399 B
Go
Raw Permalink Normal View History

2019-07-16 04:42:01 +00:00
package mredis
import (
. "testing"
"github.com/mediocregopher/mediocre-go-lib/mtest"
"github.com/mediocregopher/radix/v3"
)
func TestRedis(t *T) {
cmp := mtest.Component()
redis := InstRedis(cmp)
mtest.Run(cmp, t, func() {
var info string
if err := redis.Do(radix.Cmd(&info, "INFO")); err != nil {
t.Fatal(err)
} else if len(info) < 0 {
t.Fatal("empty info return")
}
})
}