upcrmservice_test.go 308 B

123456789101112131415161718192021222324
  1. package upcrmservice
  2. import (
  3. "flag"
  4. "os"
  5. "testing"
  6. "go-common/app/admin/main/up/conf"
  7. )
  8. var (
  9. s *Service
  10. )
  11. func TestMain(m *testing.M) {
  12. flag.Set("conf", "../../cmd/up-admin.toml")
  13. flag.Parse()
  14. if err := conf.Init(); err != nil {
  15. panic(err)
  16. }
  17. s = New(conf.Conf)
  18. m.Run()
  19. os.Exit(m.Run())
  20. }