go-common/app/admin/main/workflow/service/service_test.go
2019-04-22 18:49:16 +08:00

30 lines
451 B
Go

package service
import (
"context"
"flag"
"path/filepath"
"testing"
"github.com/smartystreets/goconvey/convey"
)
var s *Service
func init() {
flag.Parse()
dir, _ := filepath.Abs("../cmd/workflow-admin-develop.toml")
if err := flag.Set("conf", dir); err != nil {
panic(err)
}
s = New()
}
func TestPing(t *testing.T) {
convey.Convey("Ping", t, func() {
err := s.Ping(context.Background())
convey.So(err, convey.ShouldBeNil)
})
}