Blame view

common/utils_test.go 439 Bytes
29a163be   zhangqijia   fix: CreateReq ui...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  package common
  
  import (
  	"fmt"
  	"math/rand"
  	"pro2d/common/db/redisproxy"
  	"pro2d/common/logger"
  	"testing"
  )
  
  func TestRandomString(t *testing.T) {
  	rand.Seed(Timex())
  	fmt.Println(RandomName(DefaultName))
  }
  
  func TestRandomName(t *testing.T) {
  	if err := redisproxy.ConnectRedis(GlobalConf.GameConf.RedisConf.DB, GlobalConf.GameConf.RedisConf.Auth, GlobalConf.GameConf.RedisConf.Address); err != nil {
  		logger.Error(err)
  		return
  	}
  }