go-common/app/job/main/credit/service/service_test.go

32 lines
455 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package service
import (
"flag"
"path/filepath"
"testing"
"time"
"go-common/app/job/main/credit/conf"
. "github.com/smartystreets/goconvey/convey"
)
var (
s *Service
)
func init() {
dir, _ := filepath.Abs("../cmd/convey-test.toml")
flag.Set("conf", dir)
conf.Init()
s = New(conf.Conf)
time.Sleep(time.Second)
}
func TestService_loadCase(t *testing.T) {
Convey("should return err be nil", t, func() {
s.loadConf()
s.loadCase()
})
}