dao_test.go 342 B

123456789101112131415161718192021222324
  1. package oplog
  2. import (
  3. "testing"
  4. "go-common/app/admin/main/dm/conf"
  5. "go-common/library/log"
  6. )
  7. var (
  8. dao *Dao
  9. )
  10. func TestMain(m *testing.M) {
  11. var err error
  12. conf.ConfPath = "../../cmd/dm-admin-test.toml"
  13. if err = conf.Init(); err != nil {
  14. log.Error("conf.Init(%v)", err)
  15. return
  16. }
  17. dao = New(conf.Conf)
  18. m.Run()
  19. //log.Close()
  20. }