task_dispatch_test.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_UserUndoneSpecTask(t *testing.T) {
  8. Convey("UserUndoneSpecTask", t, WithDao(func(d *Dao) {
  9. _, err := d.UserUndoneSpecTask(context.Background(), 0)
  10. So(err, ShouldBeNil)
  11. }))
  12. }
  13. func Test_GetDispatchTask(t *testing.T) {
  14. Convey("GetDispatchTask", t, WithDao(func(d *Dao) {
  15. _, err := d.GetDispatchTask(context.Background(), 0)
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. func Test_UpDispatchTask(t *testing.T) {
  20. Convey("UpDispatchTask", t, WithDao(func(d *Dao) {
  21. _, err := d.UpDispatchTask(context.Background(), 0, []int64{1, 2})
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_TaskByID(t *testing.T) {
  26. Convey("TaskByID", t, WithDao(func(d *Dao) {
  27. _, err := d.TaskByID(context.Background(), 0)
  28. So(err, ShouldBeNil)
  29. }))
  30. }
  31. func Test_ListByCondition(t *testing.T) {
  32. var c = context.Background()
  33. Convey("ListByCondition", t, WithDao(func(d *Dao) {
  34. _, err := d.ListByCondition(c, 0, 0, 0, 0, 0)
  35. So(err, ShouldBeNil)
  36. }))
  37. }
  38. func Test_GetWeightDB(t *testing.T) {
  39. Convey("GetWeightDB", t, WithDao(func(d *Dao) {
  40. _, err := d.GetWeightDB(context.Background(), []int64{1, 2})
  41. So(err, ShouldBeNil)
  42. }))
  43. }
  44. func Test_TaskDispatchByID(t *testing.T) {
  45. Convey("TaskDispatchByID", t, WithDao(func(d *Dao) {
  46. _, err := d.TaskDispatchByID(context.Background(), 0)
  47. So(err, ShouldBeNil)
  48. }))
  49. }