service_test.go 514 B

12345678910111213141516171819202122232425262728293031
  1. package service
  2. import (
  3. "flag"
  4. "path/filepath"
  5. "testing"
  6. "go-common/app/infra/databus/conf"
  7. "github.com/smartystreets/goconvey/convey"
  8. )
  9. var (
  10. s *Service
  11. )
  12. func init() {
  13. dir, _ := filepath.Abs("../cmd/databus-test.toml")
  14. flag.Set("conf", dir)
  15. conf.Init()
  16. s = New(conf.Conf)
  17. }
  18. func TestArchive(t *testing.T) {
  19. convey.Convey("Archive", t, func() {
  20. a, ok := s.AuthApp("databus_test_group")
  21. convey.So(ok, convey.ShouldBeTrue)
  22. convey.So(a, convey.ShouldNotBeNil)
  23. convey.Printf("%+v", a)
  24. })
  25. }