Other(test): Set log level in feature tests

This commit is contained in:
James Houlahan
2022-11-19 16:16:54 +01:00
parent a240c4531a
commit b517e3cd5b

View File

@ -18,11 +18,19 @@
package tests
import (
"os"
"testing"
"github.com/sirupsen/logrus"
"go.uber.org/goleak"
)
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())
}