forked from Silverfish/proton-bridge
Other(test): Set log level in feature tests
This commit is contained in:
@ -18,11 +18,19 @@
|
|||||||
package tests
|
package tests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"go.uber.org/goleak"
|
"go.uber.org/goleak"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
if level := os.Getenv("FEATURE_TEST_LOG_LEVEL"); level != "" {
|
||||||
|
if parsed, err := logrus.ParseLevel(level); err == nil {
|
||||||
|
logrus.SetLevel(parsed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
goleak.VerifyTestMain(m, goleak.IgnoreCurrent())
|
goleak.VerifyTestMain(m, goleak.IgnoreCurrent())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user