MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestDB_Open

Function TestDB_Open

driver/hybriddb/db_test.go:11–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestDB_Open(t *testing.T) {
12 tempDir := t.TempDir()
13 cfg := &config.Config{
14 LevelDB: config.LevelDBConfig{
15 CacheSize: 64 * 1024 * 1024,
16 BlockSize: 4 * 1024,
17 WriteBufferSize: 4 * 1024 * 1024,
18 MaxOpenFiles: 1000,
19 Compression: true,
20 },
21 }
22
23 db, err := Store{}.Open(tempDir, cfg)
24 require.NoError(t, err)
25 defer db.Close()
26
27 assert.NotNil(t, db)
28 assert.IsType(t, &DB{}, db)
29}
30
31func TestDB_PutGet(t *testing.T) {
32 tempDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected