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

Function TestFileList_Stat

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

Source from the content-addressed store, hash-verified

328}
329
330func TestFileList_Stat(t *testing.T) {
331 if !testutils.IsSingleTesting() {
332 return
333 }
334
335 var list = caches.NewSQLiteFileList(Tea.Root + "/data/cache-index/p1")
336
337 defer func() {
338 _ = list.Close()
339 }()
340
341 err := list.Init()
342 if err != nil {
343 t.Fatal(err)
344 }
345
346 stat, err := list.Stat(nil)
347 if err != nil {
348 t.Fatal(err)
349 }
350 t.Log("count:", stat.Count, "size:", stat.Size, "valueSize:", stat.ValueSize)
351}
352
353func TestFileList_Count(t *testing.T) {
354 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
StatMethod · 0.65

Tested by

no test coverage detected