hbase_test.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/job/main/figure/model"
  5. "testing"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. var (
  9. mid int64 = 15555180
  10. score int8 = 60
  11. )
  12. //go test -test.v -test.run TestPutSpyScore
  13. func TestPutSpyScore(t *testing.T) {
  14. Convey("TestPutSpyScore no err", t, WithDao(func(d *Dao) {
  15. err := d.PutSpyScore(context.TODO(), mid, score)
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. //go test -test.v -test.run TestPutReplyAct
  20. func TestPutReplyAct(t *testing.T) {
  21. Convey("TestPutReplyAct no err", t, WithDao(func(d *Dao) {
  22. err := d.PutReplyAct(context.TODO(), mid, model.ACColumnReplyLiked, int64(-1))
  23. So(err, ShouldBeNil)
  24. }))
  25. }
  26. //go test -test.v -test.run TestPutCoinUnusual
  27. func TestPutCoinUnusual(t *testing.T) {
  28. Convey("TestPutCoinUnusual no err", t, WithDao(func(d *Dao) {
  29. err := d.PutCoinUnusual(context.TODO(), mid, model.ACColumnLowRisk)
  30. So(err, ShouldBeNil)
  31. }))
  32. }
  33. //go test -test.v -test.run TestPutCoinCount
  34. func TestPutCoinCount(t *testing.T) {
  35. Convey("TestPutCoinCount no err", t, WithDao(func(d *Dao) {
  36. err := d.PutCoinCount(context.TODO(), mid)
  37. So(err, ShouldBeNil)
  38. }))
  39. }
  40. //go test -test.v -test.run TestPayOrderInfo
  41. func TestPayOrderInfo(t *testing.T) {
  42. Convey("PayOrderInfo no err", t, WithDao(func(d *Dao) {
  43. err := d.PayOrderInfo(context.TODO(), "", mid, 1253)
  44. So(err, ShouldBeNil)
  45. }))
  46. }