(t *testing.T)
| 220 | } |
| 221 | |
| 222 | func TestFileList_CleanPrefix(t *testing.T) { |
| 223 | if !testutils.IsSingleTesting() { |
| 224 | return |
| 225 | } |
| 226 | |
| 227 | var list = caches.NewSQLiteFileList(Tea.Root + "/data/cache-index/p1") |
| 228 | |
| 229 | defer func() { |
| 230 | _ = list.Close() |
| 231 | }() |
| 232 | |
| 233 | err := list.Init() |
| 234 | if err != nil { |
| 235 | t.Fatal(err) |
| 236 | } |
| 237 | |
| 238 | before := time.Now() |
| 239 | err = list.CleanPrefix("123") |
| 240 | if err != nil { |
| 241 | t.Fatal(err) |
| 242 | } |
| 243 | t.Log(time.Since(before).Seconds()*1000, "ms") |
| 244 | } |
| 245 | |
| 246 | func TestFileList_Remove(t *testing.T) { |
| 247 | if !testutils.IsSingleTesting() { |
nothing calls this directly
no test coverage detected