go-common/app/job/main/growup/service/income/service_test.go

36 lines
579 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package income
import (
"context"
"flag"
"path/filepath"
"testing"
"go-common/app/job/main/growup/conf"
"go-common/app/job/main/growup/service/ctrl"
. "github.com/smartystreets/goconvey/convey"
)
var (
s *Service
charge *AvChargeSvr
)
func init() {
dir, _ := filepath.Abs("../../cmd/growup-job.toml")
flag.Set("conf", dir)
conf.Init()
if s == nil {
s = New(conf.Conf, ctrl.NewUnboundedExecutor())
}
charge = s.avCharge
}
func TestPing(t *testing.T) {
Convey("Test_Ping", t, func() {
err := s.Ping(context.Background())
So(err, ShouldBeNil)
})
}