From bfa2d302c9cfa5d5ad2797d2ee5395c36ab70bbf Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Sat, 24 Jul 2021 13:41:07 +0200 Subject: [PATCH] Fix a test --- errors_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/errors_test.go b/errors_test.go index e54cb63..9036834 100644 --- a/errors_test.go +++ b/errors_test.go @@ -4,6 +4,7 @@ import ( "io" "net/http" "net/http/httptest" + "path/filepath" "testing" "github.com/stretchr/testify/assert" @@ -13,6 +14,9 @@ import ( func Test_errors(t *testing.T) { app := &goBlog{ cfg: &config{ + Db: &configDb{ + File: filepath.Join(t.TempDir(), "test.db"), + }, Server: &configServer{ PublicAddress: "https://example.com", }, @@ -26,7 +30,9 @@ func Test_errors(t *testing.T) { }, } + _ = app.initDatabase(false) app.initMarkdown() + app.initSessions() _ = app.initTemplateStrings() _ = app.initRendering()