dao_test.go 340 B

123456789101112131415161718192021
  1. package dao
  2. import (
  3. "go-common/app/interface/live/app-room/conf"
  4. "go-common/library/log"
  5. "os"
  6. "testing"
  7. )
  8. var testDao *Dao
  9. func TestMain(m *testing.M) {
  10. conf.ConfPath = "../cmd/test.toml"
  11. if err := conf.Init(); err != nil {
  12. panic(err)
  13. }
  14. log.Init(conf.Conf.Log)
  15. defer log.Close()
  16. testDao = New(conf.Conf)
  17. os.Exit(m.Run())
  18. }