service_test.go 320 B

123456789101112131415161718192021222324
  1. package service
  2. import (
  3. "context"
  4. "flag"
  5. "path/filepath"
  6. "time"
  7. "go-common/app/admin/ep/melloi/conf"
  8. )
  9. var (
  10. s *Service
  11. c context.Context
  12. )
  13. func init() {
  14. dir, _ := filepath.Abs("../cmd/convey-test.toml")
  15. flag.Set("conf", dir)
  16. conf.Init()
  17. s = New(conf.Conf)
  18. c = context.TODO()
  19. time.Sleep(time.Second)
  20. }