MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestFileList_CleanPrefix

Function TestFileList_CleanPrefix

internal/caches/list_file_sqlite_test.go:222–244  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

220}
221
222func 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
246func TestFileList_Remove(t *testing.T) {
247 if !testutils.IsSingleTesting() {

Callers

nothing calls this directly

Calls 6

IsSingleTestingFunction · 0.92
NewSQLiteFileListFunction · 0.92
LogMethod · 0.80
CloseMethod · 0.65
InitMethod · 0.65
CleanPrefixMethod · 0.65

Tested by

no test coverage detected