20 lines
261 B
Go
20 lines
261 B
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"os"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
var logBuffer bytes.Buffer
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
log = logrus.StandardLogger()
|
||
|
log.Out = &logBuffer
|
||
|
log.SetLevel(logrus.DebugLevel)
|
||
|
code := m.Run()
|
||
|
os.Exit(code)
|
||
|
}
|