pub_test.go 418 B

1234567891011121314151617181920212223242526272829
  1. package dao
  2. import (
  3. . "github.com/smartystreets/goconvey/convey"
  4. "testing"
  5. )
  6. type testMsg struct {
  7. Name string
  8. Age int64
  9. }
  10. func TestDao_Pub(t *testing.T) {
  11. Convey("pub", t, func() {
  12. once.Do(startService)
  13. //startSubDataBus()
  14. //msgs := subDataBus.Messages()
  15. var uid int64 = 1
  16. u := testMsg{
  17. Name: "test",
  18. Age: 23,
  19. }
  20. err := d.Pub(ctx, uid, &u)
  21. So(err, ShouldBeNil)
  22. t.Logf("pub")
  23. })
  24. }