remove test
This commit is contained in:
parent
1f5b285d35
commit
5e3b5c8b42
@ -1,53 +0,0 @@
|
||||
// Package redis...
|
||||
//
|
||||
// Description : redis...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-02-27 10:14 下午
|
||||
package redis
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
redisInstance "github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
// TestCommandProxy ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:22 下午 2021/2/27
|
||||
func TestCommandProxy(t *testing.T) {
|
||||
instance, err := NewClient(map[string]Options{
|
||||
"test_redis": {
|
||||
Conf: &redisInstance.Options{
|
||||
Addr: "127.0.0.1:6379",
|
||||
},
|
||||
Logger: &LoggerConfig{
|
||||
LoggerPath: "/tmp/test-log",
|
||||
LoggerFile: "test-pkg-redis-client.log",
|
||||
LoggerLevel: 0,
|
||||
ConsoleOutput: true,
|
||||
Encoder: nil,
|
||||
SplitConfig: nil,
|
||||
},
|
||||
LoggerFieldConfig: nil,
|
||||
},
|
||||
}, nil)
|
||||
if nil != err {
|
||||
panic(err.Error())
|
||||
}
|
||||
r, cmdErr := instance.CommandProxy(nil, "test_redis", "set", "command_proxy", "hello world")
|
||||
c, _ := instance.GetRedisClient("test_redis")
|
||||
fmt.Println(GetRedisServerInfo(c.Instance))
|
||||
fmt.Println(GetCommandInfo(c.Instance))
|
||||
fmt.Println(GetKeyspace(c.Instance))
|
||||
fmt.Println(GetCluster(c.Instance))
|
||||
fmt.Println(GetErrorStats(c.Instance))
|
||||
assert.Nil(t, cmdErr, "命令执行成功")
|
||||
assert.Equal(t, "OK", fmt.Sprintf("%v", r))
|
||||
}
|
Loading…
Reference in New Issue
Block a user