go-common/app/infra/databus/service/service_test.go
2019-04-22 02:59:20 +00:00

32 lines
514 B
Go

package service
import (
"flag"
"path/filepath"
"testing"
"go-common/app/infra/databus/conf"
"github.com/smartystreets/goconvey/convey"
)
var (
s *Service
)
func init() {
dir, _ := filepath.Abs("../cmd/databus-test.toml")
flag.Set("conf", dir)
conf.Init()
s = New(conf.Conf)
}
func TestArchive(t *testing.T) {
convey.Convey("Archive", t, func() {
a, ok := s.AuthApp("databus_test_group")
convey.So(ok, convey.ShouldBeTrue)
convey.So(a, convey.ShouldNotBeNil)
convey.Printf("%+v", a)
})
}