优化结构

This commit is contained in:
Yvan
2026-08-22 22:34:33 +08:00
parent 0126995090
commit b18baf1547
26 changed files with 501 additions and 80 deletions
+11
View File
@@ -15,3 +15,14 @@ func TestTaskRepoListIsEmptyBeforeDatabaseInitialization(t *testing.T) {
t.Fatalf("bootstrap tasks = (%d, %d), want empty", total, len(items))
}
}
func TestTaskRepoLogsAreEmptyBeforeDatabaseInitialization(t *testing.T) {
repo := NewTaskRepo(&Data{})
items, total, err := repo.ListTaskLogs(context.Background(), 0, 0, 0, "")
if err != nil {
t.Fatal(err)
}
if total != 0 || len(items) != 0 {
t.Fatalf("bootstrap task logs = (%d, %d), want empty", total, len(items))
}
}