You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
589 B
36 lines
589 B
package service |
|
|
|
import ( |
|
"flag" |
|
"path/filepath" |
|
"testing" |
|
"time" |
|
|
|
"go-common/app/job/main/growup/conf" |
|
"go-common/app/job/main/growup/service/ctrl" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func Test_Temp(t *testing.T) { |
|
Convey("temp test", t, func() {}) |
|
} |
|
|
|
var ( |
|
srv *Service |
|
) |
|
|
|
func init() { |
|
dir, _ := filepath.Abs("../cmd/growup-job.toml") |
|
flag.Set("conf", dir) |
|
conf.Init() |
|
srv = New(conf.Conf, ctrl.NewUnboundedExecutor()) |
|
time.Sleep(time.Second) |
|
} |
|
|
|
func WithService(f func(s *Service)) func() { |
|
return func() { |
|
// Reset(func() { CleanCache() }) |
|
f(srv) |
|
} |
|
}
|
|
|