Skip to content

Commit

Permalink
remove db file before testing.
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Aug 2, 2016
1 parent 601472a commit 9dd3357
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/buntdb/buntdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package buntdb
import (
c "github.com/appleboy/gorush/config"
"github.com/stretchr/testify/assert"
"os"
"testing"
)

Expand All @@ -11,6 +12,10 @@ func TestBuntDBEngine(t *testing.T) {

config := c.BuildDefaultPushConf()

if _, err := os.Stat(config.Stat.BuntDB.Path); os.IsNotExist(err) {
os.RemoveAll(config.Stat.BuntDB.Path)
}

buntDB := New(config)
buntDB.Init()
buntDB.Reset()
Expand Down

0 comments on commit 9dd3357

Please sign in to comment.