package testutils import ( "testing" "git.gocasts.ir/ebhomengo/niki/adapter/redis" ) const portRedis = 6381 func RedisTestConfig() redis.Config { return redis.Config{ Host: "localhost", Port: portRedis, Password: "", DB: 0, } } func SetupRedis(t *testing.T) redis.Adapter { t.Helper() config := RedisTestConfig() redisAdapter := redis.New(config) return redisAdapter }