Fix setting up keyvalue storage in tests

This commit is contained in:
kolaente 2021-07-30 15:31:51 +02:00
parent d746c1bede
commit 9c2a59582a
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 6 additions and 2 deletions

View file

@ -24,13 +24,13 @@ import (
"strings"
"testing"
"code.vikunja.io/api/pkg/files"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/db"
"code.vikunja.io/api/pkg/events"
"code.vikunja.io/api/pkg/files"
"code.vikunja.io/api/pkg/models"
"code.vikunja.io/api/pkg/modules/auth"
"code.vikunja.io/api/pkg/modules/keyvalue"
"code.vikunja.io/api/pkg/routes"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"
@ -84,6 +84,7 @@ func setupTestEnv() (e *echo.Echo, err error) {
user.InitTests()
models.SetupTests()
events.Fake()
keyvalue.InitStorage()
err = db.LoadFixtures()
if err != nil {

View file

@ -20,6 +20,7 @@ import (
"code.vikunja.io/api/pkg/db"
"code.vikunja.io/api/pkg/events"
"code.vikunja.io/api/pkg/log"
"code.vikunja.io/api/pkg/modules/keyvalue"
)
// InitTests handles the actual bootstrapping of the test env
@ -40,4 +41,6 @@ func InitTests() {
}
events.Fake()
keyvalue.InitStorage()
}