service_test.go 361 B

12345678910111213141516171819202122232425262728
  1. package service
  2. import (
  3. "flag"
  4. "testing"
  5. "go-common/app/job/main/relation/conf"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. var s *Service
  9. func init() {
  10. flag.Parse()
  11. if err := conf.Init(); err != nil {
  12. panic(err)
  13. }
  14. s = New(conf.Conf)
  15. }
  16. func TestService_Close(t *testing.T) {
  17. Convey("Close", t, func() {
  18. So(s.Close(), ShouldBeNil)
  19. })
  20. }