(t *testing.T, fn func(t *testing.T, db *DB))
| 1453 | } |
| 1454 | |
| 1455 | func 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 | |
| 1464 | func withRAMIdxDB(t *testing.T, fn func(t *testing.T, db *DB)) { |
| 1465 | tmpdir, _ := os.MkdirTemp("", "nutsdb") |
no test coverage detected