MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / TestAsyncCache_RedisCache_instantiation

Function TestAsyncCache_RedisCache_instantiation

cache/async_cache_test.go:249–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

247}
248
249func TestAsyncCache_RedisCache_instantiation(t *testing.T) {
250 s := miniredis.RunT(t)
251 var redisCfg = config.Cache{
252 Name: "test",
253 Mode: "redis",
254 Redis: config.RedisCacheConfig{
255 Addresses: []string{s.Addr()},
256 },
257 Expire: config.Duration(cacheTTL),
258 MaxPayloadSize: config.ByteSize(100000000),
259 }
260
261 _, err := NewAsyncCache(redisCfg, 1*time.Second)
262 if err != nil {
263 t.Fatalf("could not instanciate redis async cache because of the following error: %s", err)
264 }
265}
266
267func TestAsyncCache_RedisCache_TLS(t *testing.T) {
268 cfg := config.TLS{

Callers

nothing calls this directly

Calls 3

DurationTypeAlias · 0.92
ByteSizeTypeAlias · 0.92
NewAsyncCacheFunction · 0.85

Tested by

no test coverage detected