Create & Init Project...
This commit is contained in:
21
app/interface/main/captcha/dao/dao_test.go
Normal file
21
app/interface/main/captcha/dao/dao_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"go-common/app/interface/main/captcha/conf"
|
||||
)
|
||||
|
||||
var (
|
||||
d *Dao
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
flag.Parse()
|
||||
dir, _ := filepath.Abs("../cmd/captcha-test.toml")
|
||||
flag.Set("conf", dir)
|
||||
conf.Init()
|
||||
d = New(conf.Conf)
|
||||
}
|
Reference in New Issue
Block a user