chore: improve codecov (#2828)

This commit is contained in:
Kevin Wan
2023-01-29 21:39:54 +08:00
committed by GitHub
parent fde05ccb28
commit 3c0dc8435e
3 changed files with 6 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ type (
}
)
// NewRedis returns a Redis.
// Deprecated: use MustNewRedis or NewRedis instead.
func (rc RedisConf) NewRedis() *Redis {
var opts []Option

View File

@@ -86,6 +86,7 @@ type (
StringCmd = red.StringCmd
)
// New returns a Redis with given options.
// Deprecated: use MustNewRedis or NewRedis instead.
func New(addr string, opts ...Option) *Redis {
return newRedis(addr, opts...)

View File

@@ -1776,7 +1776,10 @@ func runOnRedis(t *testing.T, fn func(client *Redis)) {
}
}()
fn(New(s.Addr()))
fn(MustNewRedis(RedisConf{
Host: s.Addr(),
Type: NodeType,
}))
}
func runOnRedisWithError(t *testing.T, fn func(client *Redis)) {