data_test.go 522 B

123456789101112131415161718192021222324252627282930
  1. package service
  2. import (
  3. "flag"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. "go-common/app/job/live/dao-anchor-job/internal/conf"
  7. )
  8. func init() {
  9. flag.Set("conf", "../../cmd/test.toml")
  10. if err := conf.Init(); err != nil {
  11. panic(err)
  12. }
  13. s = New(conf.Conf)
  14. }
  15. func TestMinuteDataToCacheList(t *testing.T) {
  16. Convey("testMinuteDataToCacheList", t, func() {
  17. s.minuteDataToCacheList()
  18. })
  19. }
  20. func TestMinuteDataToDB(t *testing.T) {
  21. Convey("TestMinuteDataToDB", t, func() {
  22. s.minuteDataToDB()
  23. })
  24. }