fix(store): remove default db file name

This commit is contained in:
hexxa 2022-01-29 14:04:52 +08:00 committed by Hexxa
parent 4dcb487c85
commit 8190c6c204
3 changed files with 9 additions and 3 deletions

View file

@ -3,6 +3,7 @@ package fileinfostore
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"github.com/ihexxa/quickshare/src/kvstore/boltdbpvd"
@ -151,7 +152,8 @@ func TestUserStores(t *testing.T) {
}
defer os.RemoveAll(rootPath)
kvstore := boltdbpvd.New(rootPath, 1024)
dbPath := filepath.Join(rootPath, "quickshare.db")
kvstore := boltdbpvd.New(dbPath, 1024)
defer kvstore.Close()
store, err := NewFileInfoStore(kvstore)

View file

@ -3,6 +3,7 @@ package sitestore
import (
"io/ioutil"
"os"
"path/filepath"
"reflect"
"testing"
@ -44,7 +45,8 @@ func TestSiteStore(t *testing.T) {
}
defer os.RemoveAll(rootPath)
kvstore := boltdbpvd.New(rootPath, 1024)
dbPath := filepath.Join(rootPath, "quickshare.db")
kvstore := boltdbpvd.New(dbPath, 1024)
defer kvstore.Close()
store, err := NewSiteStore(kvstore)

View file

@ -3,6 +3,7 @@ package userstore
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
@ -276,7 +277,8 @@ func TestUserStores(t *testing.T) {
}
defer os.RemoveAll(rootPath)
kvstore := boltdbpvd.New(rootPath, 1024)
dbPath := filepath.Join(rootPath, "quickshare.db")
kvstore := boltdbpvd.New(dbPath, 1024)
defer kvstore.Close()
store, err := NewKVUserStore(kvstore)