hscontrol/types: silence zerolog by default in tests
Tests were dumping megabytes of zerolog output on failure; silence at init and let individual tests opt in via SetGlobalLevel when they need log-driven assertions. Updates #3157
This commit is contained in:
parent
affaa1a31d
commit
1059c678c4
7 changed files with 66 additions and 156 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/juanfont/headscale/hscontrol/types"
|
||||
"github.com/rs/zerolog"
|
||||
"zombiezen.com/go/postgrestest"
|
||||
)
|
||||
|
||||
|
|
@ -20,7 +19,6 @@ func newSQLiteTestDB() (*HSDatabase, error) {
|
|||
}
|
||||
|
||||
log.Printf("database path: %s", tmpDir+"/headscale_test.db")
|
||||
zerolog.SetGlobalLevel(zerolog.Disabled)
|
||||
|
||||
db, err := NewHeadscaleDatabase(
|
||||
&types.Config{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue