mask_test.go 871 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/interface/main/dm2/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestUpdateMask(t *testing.T) {
  9. var (
  10. c = context.TODO()
  11. cid int64 = 2386051
  12. maskTime int64 = 60
  13. fps int32 = 25
  14. list = "26777486_s0_0_1499,26777486_s1_1500_2999,26777486_s2_3000_4499,26777486_s3_4500_5999,26777486_s4_6000_7499,26777486_s5_7500_7897"
  15. )
  16. Convey("test update mask", t, func() {
  17. err := testDao.UpdateMask(c, cid, maskTime, fps, model.MaskPlatMbl, list)
  18. So(err, ShouldBeNil)
  19. })
  20. }
  21. func TestMaskList(t *testing.T) {
  22. var (
  23. c = context.TODO()
  24. cid int64 = 1352
  25. )
  26. Convey("test mobile mask list", t, func() {
  27. res, err := testDao.MaskList(c, cid, model.MaskPlatMbl)
  28. t.Logf("==============%+v", res)
  29. So(err, ShouldBeNil)
  30. So(res, ShouldNotBeEmpty)
  31. })
  32. }