mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
添加存储
This commit is contained in:
24
bloom/redis_store_test.go
Normal file
24
bloom/redis_store_test.go
Normal file
@ -0,0 +1,24 @@
|
||||
package bloom
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
func TestRedisStore(t *testing.T) {
|
||||
client := redis.NewClient(&redis.Options{
|
||||
Addr: "192.168.2.222:6379",
|
||||
Password: "123456",
|
||||
})
|
||||
|
||||
store := newRedisStore(client, "abcdef", 10000)
|
||||
err := store.Set(1, 2, 3, 9, 1223)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
t.Log(store.Test(1))
|
||||
t.Log(store.Test(1, 2, 3))
|
||||
t.Log(store.Test(4, 5, 8))
|
||||
}
|
Reference in New Issue
Block a user