Change tests' db path to a temp folder

This commit is contained in:
Deluan
2020-01-11 16:47:26 -05:00
parent 4b1c909a4d
commit 6c05930444
2 changed files with 7 additions and 4 deletions
-3
View File
@@ -1,10 +1,8 @@
package db_storm
import (
"fmt"
"os"
"path"
"path/filepath"
"sync"
"github.com/asdine/storm"
@@ -24,7 +22,6 @@ func Db() *storm.DB {
panic(err)
}
dbPath := path.Join(conf.Sonic.DbPath, "storm.db")
dbPath = fmt.Sprintf(".%c%s", filepath.Separator, dbPath)
instance, err := storm.Open(dbPath)
log.Debug("Opening Storm DB from: " + dbPath)
if err != nil {