1 package redis 2 3 import ( 4 "testing" 5 6 "github.com/gomodule/redigo/redis" 7 "github.com/gregjones/httpcache/test" 8 ) 9 10 func TestRedisCache(t *testing.T) { 11 conn, err := redis.Dial("tcp", "localhost:6379") 12 if err != nil { 13 // TODO: rather than skip the test, fall back to a faked redis server 14 t.Skipf("skipping test; no server running at localhost:6379") 15 } 16 conn.Do("FLUSHALL") 17 18 test.Cache(t, NewWithClient(conn)) 19 } 20