Destroy the DB data directory after the test is complete
(db *DB)
| 13 | |
| 14 | // Destroy the DB data directory after the test is complete |
| 15 | func 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 | |
| 27 | func TestNewFlyDB(t *testing.T) { |
| 28 | opts := config.DefaultOptions |
no test coverage detected