go-common/app/job/main/member/service/block/service_test.go

35 lines
451 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package block
import (
"context"
"flag"
"os"
"testing"
"go-common/app/job/main/member/conf"
. "github.com/smartystreets/goconvey/convey"
)
var (
s *Service
c context.Context
)
func TestMain(m *testing.M) {
defer os.Exit(0)
flag.Set("conf", "../cmd/member-job-dev.toml")
var err error
if err = conf.Init(); err != nil {
panic(err)
}
m.Run()
}
func TestService(t *testing.T) {
Convey("", t, func() {
s.Ping(c)
s.Close()
})
}