2021-12-21 17:06:16 +01:00
|
|
|
package redis
|
|
|
|
|
|
|
|
import (
|
2022-04-22 22:12:35 +02:00
|
|
|
"context"
|
2021-12-21 17:06:16 +01:00
|
|
|
"testing"
|
|
|
|
|
2022-04-22 22:12:35 +02:00
|
|
|
"github.com/0xERR0R/blocky/log"
|
|
|
|
"github.com/go-redis/redis/v8"
|
2022-03-03 11:27:27 +01:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
2021-12-21 17:06:16 +01:00
|
|
|
. "github.com/onsi/gomega"
|
|
|
|
)
|
|
|
|
|
2023-11-19 23:51:49 +01:00
|
|
|
func init() {
|
2022-04-22 22:12:35 +02:00
|
|
|
log.Silence()
|
|
|
|
redis.SetLogger(NoLogs{})
|
2023-11-19 23:51:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestRedisClient(t *testing.T) {
|
2021-12-21 17:06:16 +01:00
|
|
|
RegisterFailHandler(Fail)
|
|
|
|
RunSpecs(t, "Redis Suite")
|
|
|
|
}
|
2022-04-22 22:12:35 +02:00
|
|
|
|
|
|
|
type NoLogs struct{}
|
|
|
|
|
2023-05-08 18:09:53 +02:00
|
|
|
func (l NoLogs) Printf(context.Context, string, ...interface{}) {}
|