Skip to content
Snippets Groups Projects
Verified Commit 468ac500 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: fix test

parent 7631413f
Branches
Tags v1.15.13
No related merge requests found
......@@ -6,22 +6,13 @@ import (
"github.com/stretchr/testify/assert"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"os"
"testing"
"time"
)
func TestWriteToDB4(t *testing.T) {
testFile := "/home/vs/workspaces/alvine/cloud/framework/dummy.sqlite"
//remove if exists
if _, err := os.Stat(testFile); err == nil {
err = os.Remove(testFile)
assert.Nil(t, err)
}
// db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{})
db, err := gorm.Open(sqlite.Open("file:"+testFile+"?cache=shared"), &gorm.Config{})
db, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{})
if err != nil {
t.Fatalf("a error occurred while opening the database: %v", err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment