From 9c2a59582ad2d8c7e07d742321cd13fe125c02ce Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 30 Jul 2021 15:31:51 +0200 Subject: [PATCH] Fix setting up keyvalue storage in tests --- pkg/integrations/integrations.go | 5 +++-- pkg/user/test.go | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/integrations/integrations.go b/pkg/integrations/integrations.go index 8bea99f3..1f96cea8 100644 --- a/pkg/integrations/integrations.go +++ b/pkg/integrations/integrations.go @@ -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 { diff --git a/pkg/user/test.go b/pkg/user/test.go index 5644cca4..c305fbb4 100644 --- a/pkg/user/test.go +++ b/pkg/user/test.go @@ -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() }