Fix tests and linters

This commit is contained in:
Daniel
2025-03-04 15:25:44 +01:00
parent 782c07d867
commit b8ab348095
8 changed files with 41 additions and 40 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/safing/portmaster/base/api"
"github.com/safing/portmaster/base/config"
"github.com/safing/portmaster/base/database/dbmodule"
"github.com/safing/portmaster/base/dataroot"
"github.com/safing/portmaster/base/notifications"
"github.com/safing/portmaster/service/updates"
)
@@ -56,6 +57,7 @@ func runTest(m *testing.M) error {
defer func() { _ = os.RemoveAll(ds) }()
stub := &testInstance{}
dbmodule.SetDatabaseLocation(dataroot.Root())
stub.db, err = dbmodule.New(stub)
if err != nil {
return fmt.Errorf("failed to create database: %w", err)