package view import ( "context" "flag" "path/filepath" "testing" "time" "go-common/app/interface/main/app-view/conf" . "github.com/smartystreets/goconvey/convey" ) var ( s *Service ) func init() { dir, _ := filepath.Abs("../../cmd/app-view-test.toml") flag.Set("conf", dir) conf.Init() s = New(conf.Conf) time.Sleep(5 * time.Second) } func Test_Ping(t *testing.T) { Convey("Ping", t, func() { s.Ping(context.TODO()) }) }