2019-12-11 16:55:18 +01:00
|
|
|
package entity
|
2019-05-16 04:03:55 +02:00
|
|
|
|
|
|
|
import (
|
2019-12-11 19:11:44 +01:00
|
|
|
"bytes"
|
2019-05-16 04:03:55 +02:00
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2019-12-11 19:11:44 +01:00
|
|
|
"github.com/sirupsen/logrus"
|
2019-05-16 04:03:55 +02:00
|
|
|
)
|
|
|
|
|
2019-12-11 19:11:44 +01:00
|
|
|
var logBuffer bytes.Buffer
|
|
|
|
|
2019-05-16 04:03:55 +02:00
|
|
|
func TestMain(m *testing.M) {
|
2019-12-11 19:11:44 +01:00
|
|
|
log = logrus.StandardLogger()
|
|
|
|
log.Out = &logBuffer
|
|
|
|
log.SetLevel(logrus.DebugLevel)
|
2019-05-16 04:03:55 +02:00
|
|
|
code := m.Run()
|
|
|
|
os.Exit(code)
|
|
|
|
}
|