MCPcopy
hub / github.com/canopy-network/canopy / testStore

Function testStore

store/store_test.go:130–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

128}
129
130func testStore(t *testing.T) (*Store, *pebble.DB, func()) {
131 fs := vfs.NewMem()
132 db, err := pebble.Open("", &pebble.Options{
133 DisableWAL: false,
134 FS: fs,
135 L0CompactionThreshold: 4,
136 L0StopWritesThreshold: 12,
137 MaxOpenFiles: 1000,
138 FormatMajorVersion: pebble.FormatNewest,
139 })
140 store, err := NewStoreWithDB(lib.DefaultConfig(), db, nil, lib.NewDefaultLogger())
141 require.NoError(t, err)
142 return store, db, func() { store.Close() }
143}
144
145func validateIterators(t *testing.T, prefix string, expectedKeys []string, iterators ...lib.IteratorI) {
146 for _, it := range iterators {

Callers 7

TestGetTxByHashFunction · 0.85
TestGetTxByHeightFunction · 0.85
TestFuzzFunction · 0.85
TestStoreSetGetDeleteFunction · 0.85
TestIteratorCommitBasicFunction · 0.85
TestDoublyNestedTxnFunction · 0.85

Calls 4

DefaultConfigFunction · 0.92
NewDefaultLoggerFunction · 0.92
NewStoreWithDBFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected