MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / destroyDB

Function destroyDB

engine/db_test.go:15–25  ·  view source on GitHub ↗

Destroy the DB data directory after the test is complete

(db *DB)

Source from the content-addressed store, hash-verified

13
14// Destroy the DB data directory after the test is complete
15func destroyDB(db *DB) {
16 if db != nil {
17 if db.activeFile != nil {
18 _ = db.Close()
19 }
20 err := os.RemoveAll(db.options.DirPath)
21 if err != nil {
22 panic(err)
23 }
24 }
25}
26
27func TestNewFlyDB(t *testing.T) {
28 opts := config.DefaultOptions

Callers 8

TestNewFlyDBFunction · 0.85
TestDB_PutFunction · 0.85
TestDB_ConcurrentPutFunction · 0.85
TestDB_GetFunction · 0.85
TestDB_DeleteFunction · 0.85
TestDB_GetListKeysFunction · 0.85
TestDB_FoldFunction · 0.85
TestDB_SyncFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected