splash_test.go 707 B

123456789101112131415161718192021222324252627282930313233343536
  1. package v1
  2. import (
  3. "context"
  4. "flag"
  5. "fmt"
  6. "testing"
  7. "go-common/app/interface/live/app-blink/conf"
  8. rspb "go-common/app/service/live/resource/api/grpc/v1"
  9. . "github.com/smartystreets/goconvey/convey"
  10. )
  11. var sp *SplashService
  12. func init() {
  13. flag.Set("conf", "../../cmd/test.toml")
  14. if err := conf.Init(); err != nil {
  15. panic(err)
  16. }
  17. sp = NewSplashService(conf.Conf)
  18. }
  19. // DEPLOY_ENV=uat go test -run TestNewSplashService
  20. func TestNewSplashService(t *testing.T) {
  21. Convey("TestNewSplashService", t, func() {
  22. res, err := sp.GetInfo(context.TODO(), &rspb.GetInfoReq{
  23. Platform: "android",
  24. Build: 53100,
  25. })
  26. fmt.Println(res, err)
  27. t.Logf("%v,%s", res, err)
  28. So(err, ShouldBeNil)
  29. })
  30. }