Rename current db to boltdb
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gitea.hashru.nl/dsprenkels/rushlink/internal/db"
|
||||
"gitea.hashru.nl/dsprenkels/rushlink/internal/boltdb"
|
||||
"github.com/gorilla/mux"
|
||||
"go.etcd.io/bbolt"
|
||||
)
|
||||
@@ -31,12 +31,12 @@ func createTemporaryRouter(t *testing.T) (*mux.Router, *rushlink) {
|
||||
os.RemoveAll(tempDir)
|
||||
})
|
||||
|
||||
fileStore, err := db.OpenFileStore(filepath.Join(tempDir, "filestore"))
|
||||
fileStore, err := boltdb.OpenFileStore(filepath.Join(tempDir, "filestore"))
|
||||
if err != nil {
|
||||
t.Fatalf("opening temporary filestore: %s\n", err)
|
||||
}
|
||||
databasePath := filepath.Join(tempDir, "rushlink.db")
|
||||
database, err := db.OpenDB(databasePath, fileStore)
|
||||
database, err := boltdb.OpenDB(databasePath, fileStore)
|
||||
if err != nil {
|
||||
t.Fatalf("opening temporary database: %s\n", err)
|
||||
}
|
||||
@@ -136,7 +136,7 @@ func TestIssue53(t *testing.T) {
|
||||
|
||||
// Check that any attempt to do directory traversal has failed.
|
||||
rl.db.Bolt.View(func(tx *bbolt.Tx) error {
|
||||
fus, err := db.AllFileUploads(tx)
|
||||
fus, err := boltdb.AllFileUploads(tx)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user