redis_test.go 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package redis
  2. import (
  3. "context"
  4. "testing"
  5. _ "github.com/go-sql-driver/mysql"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func Test_AddArcClick(t *testing.T) {
  9. var (
  10. err error
  11. c = context.TODO()
  12. )
  13. Convey("AddArcClick", t, WithDao(func(d *Dao) {
  14. err = d.AddArcClick(c, 1, 1)
  15. So(err, ShouldBeNil)
  16. }))
  17. }
  18. //ArcClick
  19. func Test_ArcClick(t *testing.T) {
  20. var (
  21. err error
  22. c = context.TODO()
  23. )
  24. Convey("ArcClick", t, WithDao(func(d *Dao) {
  25. _, err = d.ArcClick(c, 1)
  26. So(err, ShouldBeNil)
  27. }))
  28. }
  29. //DelFilename
  30. func Test_DelFilename(t *testing.T) {
  31. var (
  32. err error
  33. c = context.TODO()
  34. )
  35. Convey("DelFilename", t, WithDao(func(d *Dao) {
  36. err = d.DelFilename(c, "1")
  37. So(err, ShouldBeNil)
  38. }))
  39. }
  40. //SetMonitorCache
  41. func Test_SetMonitorCache(t *testing.T) {
  42. var (
  43. err error
  44. c = context.TODO()
  45. )
  46. Convey("SetMonitorCache", t, WithDao(func(d *Dao) {
  47. _, err = d.SetMonitorCache(c, 1)
  48. So(err, ShouldBeNil)
  49. }))
  50. }