123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- package service
- import (
- "context"
- "go-common/app/admin/main/laser/model"
- "testing"
- "time"
- "github.com/smartystreets/goconvey/convey"
- )
- func TestServiceArchiveRecheck(t *testing.T) {
- convey.Convey("ArchiveRecheck", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- typeIDS = []int64{}
- unames = ""
- startDate = int64(0)
- endDate = int64(0)
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.ArchiveRecheck(c, typeIDS, unames, startDate, endDate)
- convCtx.Convey("Then err should be nil.recheckViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceUserRecheck(t *testing.T) {
- convey.Convey("UserRecheck", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- typeIDS = []int64{}
- unames = ""
- startDate = int64(0)
- endDate = int64(0)
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.UserRecheck(c, typeIDS, unames, startDate, endDate)
- convCtx.Convey("Then err should be nil.recheckViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceDailyStatArchiveRecheck(t *testing.T) {
- convey.Convey("dailyStatArchiveRecheck", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- business = int(0)
- typeIDS = []int64{}
- statTypes = []int64{}
- uids = []int64{}
- statDate = time.Now()
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.dailyStatArchiveRecheck(c, business, typeIDS, statTypes, uids, statDate)
- convCtx.Convey("Then err should be nil.statViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServicemakeUpArchiveRecheck(t *testing.T) {
- convey.Convey("makeUpArchiveRecheck", t, func(convCtx convey.C) {
- var (
- mediateView map[int64]map[int]int64
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- makeUpArchiveRecheck(mediateView)
- convCtx.Convey("Then statViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceDailyStatArchiveStat(t *testing.T) {
- convey.Convey("dailyArchiveStat", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- business = int(0)
- typeIDS = []int64{}
- statTypes = []int64{}
- uids = []int64{}
- statDate = time.Now()
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.dailyArchiveStat(c, business, typeIDS, statTypes, uids, statDate)
- convCtx.Convey("Then err should be nil.mediateView should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceTagRecheck(t *testing.T) {
- convey.Convey("TagRecheck", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- unames = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.TagRecheck(c, startDate, endDate, unames)
- convCtx.Convey("Then err should be nil.tagViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceDailyStatTagRecheck(t *testing.T) {
- convey.Convey("dailyStatTagRecheck", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- business = int(0)
- statTypes = []int64{}
- uids = []int64{}
- statDate = time.Now()
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.dailyStatTagRecheck(c, business, statTypes, uids, statDate)
- convCtx.Convey("Then err should be nil.statViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServicemakeUpTagRecheck(t *testing.T) {
- convey.Convey("makeUpTagRecheck", t, func(convCtx convey.C) {
- var (
- mediateView map[int64]map[int]int64
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- makeUpTagRecheck(mediateView)
- convCtx.Convey("Then statViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceRecheck123(t *testing.T) {
- convey.Convey("Recheck123", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- typeIDS = []int64{}
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.Recheck123(c, startDate, endDate, typeIDS)
- convCtx.Convey("Then err should be nil.recheckView should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceDailyStatArchiveStreamStat(t *testing.T) {
- convey.Convey("dailyStatArchiveStreamStat", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- business = int(0)
- typeIDS = []int64{}
- uids = []int64{}
- statTypes = []int64{}
- statDate = time.Now()
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.dailyStatArchiveStreamStat(c, business, typeIDS, uids, statTypes, statDate)
- convCtx.Convey("Then err should be nil.statViews should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServicewrap(t *testing.T) {
- convey.Convey("wrap", t, func(convCtx convey.C) {
- var (
- cargoMap map[int64]*model.CargoItem
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- wrap(cargoMap)
- convCtx.Convey("Then views should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceCsvAuditCargo(t *testing.T) {
- convey.Convey("CsvAuditCargo", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- unames = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.CsvAuditCargo(c, startDate, endDate, unames)
- convCtx.Convey("Then err should be nil.res should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceAuditorCargoList(t *testing.T) {
- convey.Convey("AuditorCargoList", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- unames = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.AuditorCargoList(c, startDate, endDate, unames)
- convCtx.Convey("Then err should be nil.wrappers,lineWidth should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceCsvRandomVideoAudit(t *testing.T) {
- convey.Convey("CsvRandomVideoAudit", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- unames = ""
- typeIDS = []int64{}
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.CsvRandomVideoAudit(c, startDate, endDate, unames, typeIDS)
- convCtx.Convey("Then err should be nil.res should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceCsvFixedVideoAudit(t *testing.T) {
- convey.Convey("CsvFixedVideoAudit", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- unames = ""
- typeIDS = []int64{}
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.CsvFixedVideoAudit(c, startDate, endDate, unames, typeIDS)
- convCtx.Convey("Then err should be nil.res should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceRandomVideo(t *testing.T) {
- convey.Convey("RandomVideo", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- typeIDS = []int64{}
- uname = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.RandomVideo(c, startDate, endDate, typeIDS, uname)
- convCtx.Convey("Then err should be nil.statViewExts,lineWidth should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceFixedVideo(t *testing.T) {
- convey.Convey("FixedVideo", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- startDate = int64(0)
- endDate = int64(0)
- typeIDS = []int64{}
- uname = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.FixedVideo(c, startDate, endDate, typeIDS, uname)
- convCtx.Convey("Then err should be nil.statViewExts,lineWidth should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServiceVideoAudit(t *testing.T) {
- convey.Convey("videoAudit", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- business = int(0)
- statDate = time.Now()
- typeIDS = []int64{}
- unames = ""
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.videoAudit(c, business, statDate, typeIDS, unames)
- convCtx.Convey("Then err should be nil.viewExts,lineWidth should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
- func TestServicestatNode2ViewExt(t *testing.T) {
- convey.Convey("statNode2ViewExt", t, func(convCtx convey.C) {
- var (
- c = context.Background()
- statNodes = []*model.StatNode{}
- needALL = false
- )
- convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
- s.statNode2ViewExt(c, statNodes, needALL)
- convCtx.Convey("Then err should be nil.statViewsExts,lineWidth should not be nil.", func(convCtx convey.C) {
- })
- })
- })
- }
|