Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package activitySer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"stat/common/log"
|
||||
"stat/common/redis"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func initRedis() error {
|
||||
rds, err := redis.NewManagerWithUrl("redis://:B6vJHlYiTseLj77z@118.107.44.18:16789/7")
|
||||
if err != nil {
|
||||
log.Error("rds init err", log.E(err))
|
||||
return err
|
||||
}
|
||||
|
||||
redis.StatRds = rds
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestCanUserDraw(t *testing.T) {
|
||||
|
||||
// 初始化redis
|
||||
if err := initRedis(); err != nil {
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
res := CanUserDraw("610.0.21.100", "6063296c6d2c51859840b072")
|
||||
fmt.Print(res)
|
||||
}
|
||||
Reference in New Issue
Block a user