dao_test.go 529 B

12345678910111213141516171819202122232425262728293031
  1. package hbase
  2. import (
  3. "context"
  4. "flag"
  5. "path/filepath"
  6. "testing"
  7. "go-common/app/job/main/videoup-report/conf"
  8. "go-common/app/job/main/videoup-report/model/task"
  9. . "github.com/smartystreets/goconvey/convey"
  10. )
  11. var (
  12. d *Dao
  13. )
  14. func init() {
  15. dir, _ := filepath.Abs("../../cmd/videoup-report-job.toml")
  16. flag.Set("conf", dir)
  17. conf.Init()
  18. d = New(conf.Conf)
  19. }
  20. func Test_AddLog(t *testing.T) {
  21. Convey("AddLog", t, func() {
  22. err := d.AddLog(context.TODO(), &task.WeightLog{TaskID: 44441})
  23. So(err, ShouldBeNil)
  24. })
  25. }