archive_test.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package databus
  2. import (
  3. "context"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "go-common/app/admin/main/videoup/model/archive"
  6. "go-common/app/admin/main/videoup/model/message"
  7. "testing"
  8. )
  9. func TestPopMsgCache(t *testing.T) {
  10. var (
  11. err error
  12. )
  13. Convey("PopMsgCache", t, WithDao(func(d *Dao) {
  14. _, err = d.PopMsgCache(context.Background())
  15. So(err, ShouldBeNil)
  16. }))
  17. }
  18. func TestDao_PushMultSync(t *testing.T) {
  19. Convey("PushMultSync", t, WithDao(func(d *Dao) {
  20. c := context.TODO()
  21. sync := &archive.MultSyncParam{}
  22. _, err := d.PushMultSync(c, sync)
  23. So(err, ShouldBeNil)
  24. }))
  25. }
  26. func TestDao_PopMultSync(t *testing.T) {
  27. Convey("PopMultSync", t, WithDao(func(d *Dao) {
  28. c := context.TODO()
  29. _, err := d.PopMultSync(c)
  30. So(err, ShouldBeNil)
  31. }))
  32. }
  33. func TestDao_PopMsgCache(t *testing.T) {
  34. Convey("FlowGroupPools", t, WithDao(func(d *Dao) {
  35. c := context.TODO()
  36. _, err := d.PopMsgCache(c)
  37. So(err, ShouldBeNil)
  38. }))
  39. }
  40. func TestDao_PushMsgCache(t *testing.T) {
  41. Convey("FlowGroupPools", t, WithDao(func(d *Dao) {
  42. c := context.TODO()
  43. msg := &message.Videoup{}
  44. err := d.PushMsgCache(c, msg)
  45. So(err, ShouldBeNil)
  46. }))
  47. }