go-common/app/job/main/videoup-report/dao/archive/archive_test.go

28 lines
564 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package archive
import (
"context"
"testing"
. "github.com/smartystreets/goconvey/convey"
"time"
)
func Test_Archive(t *testing.T) {
Convey("ArchiveByAid", t, func() {
archive, err := d.ArchiveByAid(context.TODO(), 1)
So(err, ShouldBeNil)
Println(archive)
})
}
func Test_ExcitationArchivesByTime(t *testing.T) {
Convey("ExcitationArchivesByTime", t, func() {
now := time.Now()
st := now.Add(-1680000 * time.Hour)
archives, err := d.ExcitationArchivesByTime(context.TODO(), 27515256, st, now)
So(err, ShouldBeNil)
Println(archives)
})
}