mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
25 lines
454 B
Go
25 lines
454 B
Go
package redis
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestRename(t *testing.T) {
|
|
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)
|
|
}
|