first commit
This commit is contained in:
27
service/group/dao/dao_test.go
Normal file
27
service/group/dao/dao_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/inconshreveable/log15"
|
||||
"gitlab.33.cn/chat/dtalk/pkg/mysql"
|
||||
"gitlab.33.cn/chat/dtalk/service/group/config"
|
||||
)
|
||||
|
||||
var (
|
||||
testLog log15.Logger
|
||||
testConn *mysql.MysqlConn
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
testConn = newDB(&config.MySQL{
|
||||
Host: "127.0.0.1",
|
||||
Port: 3306,
|
||||
User: "root",
|
||||
Pwd: "123456",
|
||||
Db: "dtalk",
|
||||
})
|
||||
testLog = log15.New("model", "group/test")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
Reference in New Issue
Block a user