Skip to content

Commit

Permalink
use debug level logging in testing (#1176)
Browse files Browse the repository at this point in the history
I find myself committing a custom test logger that logs on `DEBUG` level
quite often when I run into an NDF on the CI. Figured it's fine to have
`DEBUG` level logging by default in all e2e tests.
  • Loading branch information
ChrisSchinnerl committed Apr 17, 2024
2 parents 743b2a8 + 7a703da commit e4e4a6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion internal/test/e2e/cluster.go
Expand Up @@ -168,7 +168,7 @@ type testClusterOptions struct {

// newTestLogger creates a console logger used for testing.
func newTestLogger() *zap.Logger {
return newTestLoggerCustom(zapcore.ErrorLevel)
return newTestLoggerCustom(zapcore.DebugLevel)
}

// newTestLoggerCustom creates a console logger used for testing and allows
Expand Down
13 changes: 3 additions & 10 deletions internal/test/e2e/cluster_test.go
Expand Up @@ -27,7 +27,6 @@ import (
"go.sia.tech/renterd/object"
"go.sia.tech/renterd/wallet"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"lukechampine.com/frand"
)

Expand Down Expand Up @@ -1453,9 +1452,7 @@ func TestWalletTransactions(t *testing.T) {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
logger: newTestLoggerCustom(zapcore.DebugLevel),
})
cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
tt := cluster.tt
Expand Down Expand Up @@ -1709,9 +1706,7 @@ func TestWallet(t *testing.T) {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
logger: newTestLoggerCustom(zapcore.DebugLevel),
})
cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
tt := cluster.tt
Expand Down Expand Up @@ -1916,9 +1911,7 @@ func TestAlerts(t *testing.T) {
t.SkipNow()
}

cluster := newTestCluster(t, testClusterOptions{
logger: newTestLoggerCustom(zapcore.DebugLevel),
})
cluster := newTestCluster(t, clusterOptsDefault)
defer cluster.Shutdown()
b := cluster.Bus
tt := cluster.tt
Expand Down

0 comments on commit e4e4a6e

Please sign in to comment.