service_test.go 299 B

1234567891011121314151617181920212223
  1. package data
  2. import (
  3. "flag"
  4. "go-common/app/admin/main/up/conf"
  5. "os"
  6. "testing"
  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. }