cleanupDBDir

This commit is contained in:
Ethan Buchman
2017-12-12 19:28:52 -05:00
parent ba8c5045b5
commit bb115d4d61
2 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,6 @@ package db
import (
"bytes"
"fmt"
"os"
"testing"
"github.com/stretchr/testify/assert"
@ -90,7 +89,7 @@ func bytes2Int64(buf []byte) int64 {
func TestCLevelDBBackendStr(t *testing.T) {
name := cmn.Fmt("test_%x", cmn.RandStr(12))
db := NewDB(name, LevelDBBackendStr, "")
defer os.RemoveAll(name)
defer cleanupDBDir("", name)
_, ok := db.(*CLevelDB)
assert.True(t, ok)