dao_test.go 278 B

123456789101112131415161718192021
  1. package dao
  2. import (
  3. "flag"
  4. "path/filepath"
  5. "testing"
  6. "go-common/app/interface/main/captcha/conf"
  7. )
  8. var (
  9. d *Dao
  10. )
  11. func TestMain(m *testing.M) {
  12. flag.Parse()
  13. dir, _ := filepath.Abs("../cmd/captcha-test.toml")
  14. flag.Set("conf", dir)
  15. conf.Init()
  16. d = New(conf.Conf)
  17. }