service_test.go 451 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "context"
  4. "flag"
  5. "path/filepath"
  6. "testing"
  7. "github.com/smartystreets/goconvey/convey"
  8. )
  9. var s *Service
  10. func init() {
  11. flag.Parse()
  12. dir, _ := filepath.Abs("../cmd/workflow-admin-develop.toml")
  13. if err := flag.Set("conf", dir); err != nil {
  14. panic(err)
  15. }
  16. s = New()
  17. }
  18. func TestPing(t *testing.T) {
  19. convey.Convey("Ping", t, func() {
  20. err := s.Ping(context.Background())
  21. convey.So(err, convey.ShouldBeNil)
  22. })
  23. }