go-common/app/interface/main/app-view/service/view/service_test.go

32 lines
444 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
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())
})
}