redis_test.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoTryLockReviewNotify(t *testing.T) {
  9. convey.Convey("TryLockReviewNotify", t, func() {
  10. now := time.Now()
  11. no := time.Date(2018, 1, 7, 20, now.Minute(), now.Second(), 651387237, time.UTC)
  12. p1, err := d.TryLockReviewNotify(context.Background(), no)
  13. convey.So(err, convey.ShouldBeNil)
  14. convey.So(p1, convey.ShouldNotBeNil)
  15. })
  16. }
  17. //func TestDaoreviewAuditNotifyLockKey(t *testing.T) {
  18. // convey.Convey("reviewAuditNotifyLockKey", t, func(ctx convey.C) {
  19. // var (
  20. // no = time.Now()
  21. // )
  22. // ctx.Convey("When everything goes positive", func(ctx convey.C) {
  23. // p1 := reviewAuditNotifyLockKey(no)
  24. // ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  25. // ctx.So(p1, convey.ShouldNotBeNil)
  26. // })
  27. // })
  28. // })
  29. //}
  30. //
  31. //func TestDaopingRedis(t *testing.T) {
  32. // convey.Convey("pingRedis", t, func(ctx convey.C) {
  33. // var (
  34. // c = context.Background()
  35. // )
  36. // ctx.Convey("When everything goes positive", func(ctx convey.C) {
  37. // err := d.pingRedis(c)
  38. // ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  39. // ctx.So(err, convey.ShouldBeNil)
  40. // })
  41. // })
  42. // })
  43. //}