You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
640 B
33 lines
640 B
package dao |
|
|
|
import ( |
|
"strconv" |
|
"testing" |
|
"time" |
|
|
|
"go-common/app/admin/ep/marthe/model" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
var ( |
|
tmpIssueNoStr3 = strconv.FormatInt(time.Now().Unix(), 10) |
|
|
|
scheduleTask = &model.ScheduleTask{ |
|
Name: tmpIssueNoStr3, |
|
Status: model.TaskStatusRunning, |
|
} |
|
) |
|
|
|
func Test_Schedule_task(t *testing.T) { |
|
Convey("test insert schedule task", t, func() { |
|
err := d.InsertScheduleTask(scheduleTask) |
|
So(err, ShouldBeNil) |
|
}) |
|
|
|
Convey("test update schedule task", t, func() { |
|
scheduleTask.Status = model.TaskStatusDone |
|
err := d.UpdateScheduleTask(scheduleTask) |
|
So(err, ShouldBeNil) |
|
}) |
|
}
|
|
|