Create & Init Project...
This commit is contained in:
33
app/job/main/growup/service/charge/service_test.go
Normal file
33
app/job/main/growup/service/charge/service_test.go
Normal file
@ -0,0 +1,33 @@
|
||||
package charge
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
func init() {
|
||||
dir, _ := filepath.Abs("../../cmd/growup-job.toml")
|
||||
flag.Set("conf", dir)
|
||||
conf.Init()
|
||||
if s == nil {
|
||||
s = New(conf.Conf, ctrl.NewUnboundedExecutor())
|
||||
}
|
||||
}
|
||||
|
||||
func TestPing(t *testing.T) {
|
||||
Convey("Test_Ping", t, func() {
|
||||
err := s.Ping(context.Background())
|
||||
So(err, ShouldBeNil)
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user