Fix tests and linter warnings

This commit is contained in:
Daniel 2022-02-01 13:12:46 +01:00
parent 7d2cd6c15d
commit f59ad0357a
162 changed files with 668 additions and 696 deletions

View file

@ -6,11 +6,10 @@ import (
"os"
"testing"
"github.com/safing/portbase/dataroot"
"github.com/safing/portbase/modules"
// API depends on the database for the database api.
_ "github.com/safing/portbase/database/dbmodule"
"github.com/safing/portbase/dataroot"
"github.com/safing/portbase/modules"
)
func init() {
@ -28,7 +27,7 @@ func TestMain(m *testing.M) {
os.Exit(1)
}
// initialize data dir
err = dataroot.Initialize(tmpDir, 0755)
err = dataroot.Initialize(tmpDir, 0o0755)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to initialize data root: %s\n", err)
os.Exit(1)