diff --git a/pkg/transport/manager_test.go b/pkg/transport/manager_test.go index dbe2b110e..8de4dc65b 100644 --- a/pkg/transport/manager_test.go +++ b/pkg/transport/manager_test.go @@ -4,6 +4,8 @@ import ( "context" "fmt" "io" + "log" + "os" "sync" "testing" "time" @@ -12,9 +14,25 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/skycoin/skycoin/src/util/logging" "github.com/skycoin/skywire/pkg/cipher" ) +func TestMain(m *testing.M) { + loggingLevel, ok := os.LookupEnv("TEST_LOGGING_LEVEL") + if ok { + lvl, err := logging.LevelFromString(loggingLevel) + if err != nil { + log.Fatal(err) + } + logging.SetLevel(lvl) + } else { + logging.Disable() + } + + os.Exit(m.Run()) +} + func TestTransportManager(t *testing.T) { client := NewDiscoveryMock() logStore := InMemoryTransportLogStore()