archive_test.go 564 B

123456789101112131415161718192021222324252627
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. "time"
  7. )
  8. func Test_Archive(t *testing.T) {
  9. Convey("ArchiveByAid", t, func() {
  10. archive, err := d.ArchiveByAid(context.TODO(), 1)
  11. So(err, ShouldBeNil)
  12. Println(archive)
  13. })
  14. }
  15. func Test_ExcitationArchivesByTime(t *testing.T) {
  16. Convey("ExcitationArchivesByTime", t, func() {
  17. now := time.Now()
  18. st := now.Add(-1680000 * time.Hour)
  19. archives, err := d.ExcitationArchivesByTime(context.TODO(), 27515256, st, now)
  20. So(err, ShouldBeNil)
  21. Println(archives)
  22. })
  23. }