MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / withDefaultDB

Function withDefaultDB

db_test.go:1455–1462  ·  view source on GitHub ↗
(t *testing.T, fn func(t *testing.T, db *DB))

Source from the content-addressed store, hash-verified

1453}
1454
1455func withDefaultDB(t *testing.T, fn func(t *testing.T, db *DB)) {
1456 tmpdir, _ := os.MkdirTemp("", "nutsdb")
1457 opt := DefaultOptions
1458 opt.Dir = tmpdir
1459 opt.SegmentSize = 8 * 1024
1460
1461 withDBOption(t, opt, fn)
1462}
1463
1464func withRAMIdxDB(t *testing.T, fn func(t *testing.T, db *DB)) {
1465 tmpdir, _ := os.MkdirTemp("", "nutsdb")

Callers 15

TestIsPrefixScanFunction · 0.85
TestIsPrefixSearchScanFunction · 0.85
TestTx_PutAndGetFunction · 0.85
TestTx_GetAfterDeleteFunction · 0.85
TestTx_RangeScan_ErrFunction · 0.85
TestTx_RangeScanFunction · 0.85
TestTx_PrefixScanFunction · 0.85
TestTx_PrefixSearchScanFunction · 0.85
TestTx_DeleteAndGetFunction · 0.85
TestTx_Put_ErrFunction · 0.85

Calls 1

withDBOptionFunction · 0.85

Tested by

no test coverage detected