From 4fb70e44b45a9cefb9b190f9222a51adcf279779 Mon Sep 17 00:00:00 2001 From: slhmy <1484836413@qq.com> Date: Fri, 9 Feb 2024 16:22:49 +0800 Subject: [PATCH] Remove outdate test --- tests/mapper/submission_test.go | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 tests/mapper/submission_test.go diff --git a/tests/mapper/submission_test.go b/tests/mapper/submission_test.go deleted file mode 100644 index cbb26a7..0000000 --- a/tests/mapper/submission_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package mapper_test - -import ( - "fmt" - "testing" - - gormAgent "github.com/OJ-lab/oj-lab-services/src/core/agent/gorm" - "github.com/OJ-lab/oj-lab-services/src/service/mapper" - "github.com/OJ-lab/oj-lab-services/src/service/model" -) - -func TestSubmissionMapper(t *testing.T) { - db := gormAgent.GetDefaultDB() - getOptions := mapper.GetSubmissionOptions{ - UserAccount: func() *string { s := "admin"; return &s }(), - OrderByColumns: []model.OrderByColumnOption{{ - Column: string(model.JudgeTaskSubmissionSortByColumnCreateAt), - Desc: true, - }}, - } - submissionList, _, err := mapper.GetSubmissionListByOptions(db, getOptions) - if err != nil { - t.Error(err) - } - if len(submissionList) < 2 { - t.Error("submission list should not be less than 2") - } - if submissionList[0].MetaFields.CreateAt.Before(*submissionList[1].MetaFields.CreateAt) { - t.Error("submission list should be sorted by create_at desc") - } - - fmt.Printf("%+v\n", submissionList) -}