1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2023-11-03 15:48:14 +08:00
parent 01f426c5b2
commit bdbf18969e
10 changed files with 93 additions and 33 deletions

View File

@ -10,6 +10,15 @@ import (
"github.com/stretchr/testify/assert"
)
var DefaultRedis = redis.RedisOption{
Addr: "redis:6379",
Password: "123456",
}
func RunOnDefaultRedis(t assert.TestingT, fn func(rdb redis.Client)) {
RunOnRedis(t, fn, DefaultRedis)
}
func RunOnRedis(t assert.TestingT, fn func(rdb redis.Client), opt ...redis.RedisOption) {
var redis redis.Client
var clean func()