mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
优化redis eval的key重命名
This commit is contained in:
@ -1,9 +1,24 @@
|
||||
package redis
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestRename(t *testing.T) {
|
||||
New(&ReidsOption{
|
||||
New(&RedisOption{
|
||||
Addrs: []string{"192.168.123.100:6379"},
|
||||
})
|
||||
}
|
||||
|
||||
func TestEvalName(t *testing.T) {
|
||||
rdb := New(&RedisOption{
|
||||
Addrs: []string{"192.168.123.100:6379"},
|
||||
Prefix: "aabbcc",
|
||||
})
|
||||
|
||||
_, err := rdb.Eval(context.Background(), "return 1", []string{"a1", "a2", "a3"}, "b1", "b2", "b3").Result()
|
||||
assert.Nil(t, err, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user