go-common/app/interface/main/app-view/service/view/service_test.go
2019-04-22 18:49:16 +08:00

32 lines
444 B
Go

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())
})
}