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

Function testCountStore

internal/utils/kvstore/store_test.go:211–229  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func testCountStore(t *testing.T) {
212 var err error
213 testingStore, err = kvstore.OpenStore("test")
214 if err != nil {
215 t.Fatal(err)
216 }
217 var count int
218 it, err := testingStore.RawDB().NewIter(&pebble.IterOptions{})
219 if err != nil {
220 t.Fatal(err)
221 }
222 defer func() {
223 _ = it.Close()
224 }()
225 for it.First(); it.Valid(); it.Next() {
226 count++
227 }
228 t.Log("count:", count)
229}

Callers 1

TestStore_CountFunction · 0.85

Calls 5

OpenStoreFunction · 0.92
NextMethod · 0.80
LogMethod · 0.80
CloseMethod · 0.65
RawDBMethod · 0.45

Tested by

no test coverage detected