2019-10-03 00:17:34 +00:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Test_RedisURI(t *testing.T) {
|
2019-10-03 00:36:45 +00:00
|
|
|
cache, err := New("redis://127.0.0.1:6389")
|
2019-10-03 00:17:34 +00:00
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal("Error creating cache:", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if _, ok := cache.(*RedisCache); !ok {
|
|
|
|
t.Fatal("Cache is not instance of RedisCache")
|
|
|
|
}
|
|
|
|
}
|