func MockRedis() {
	s, err := miniredis.Run()
	if err != nil {
		panic(err)
	}

	client = redis.NewClient(&redis.Options{
		Addr: s.Addr(),
	})

	ctx := context.Background()
	_, err = client.Ping(ctx).Result()
	if err != nil {
		panic(err)
	}
}
// MockRedis mock redis for unittests
MockRedis mock redis for unittests
// MockRedis mock redis for unittests
func MockRedis() {
	s, err := miniredis.Run()
	if err != nil {
		panic(err)
	}
	client = redis.NewClient(&redis.Options{
		Addr: s.Addr(),
	})
	ctx := context.Background()
	_, err = client.Ping(ctx).Result()
	if err != nil {
		panic(err)
	}
}
func MockRedis ( ) { s , err := miniredis . Run ( ) if err != nil { panic ( err ) } client = redis . NewClient ( & redis . Options { Addr : s . Addr ( ) , } ) ctx := context . Background ( ) _ , err = client . Ping ( ctx ) . Result ( ) if err != nil { panic ( err ) } }
MockRedis mock redis for unittests
MockRedis mock redis for unittests