Browse Source

Fix setting up keyvalue storage in tests

pull/928/head
kolaente 2 months ago
parent
commit
9c2a59582a
Signed by: konrad GPG Key ID: F40E70337AB24C9B
  1. 5
      pkg/integrations/integrations.go
  2. 3
      pkg/user/test.go

5
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 {

3
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()
}

Loading…
Cancel
Save