2020-05-05 08:39:38 +00:00
|
|
|
package validator
|
|
|
|
|
|
|
|
import (
|
2020-08-10 16:52:49 +00:00
|
|
|
"io/ioutil"
|
2020-11-14 02:28:14 +00:00
|
|
|
"os"
|
2020-05-05 08:39:38 +00:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
2020-08-10 16:52:49 +00:00
|
|
|
"github.com/sirupsen/logrus"
|
2020-05-05 08:39:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2020-11-14 02:28:14 +00:00
|
|
|
run := func() int {
|
|
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
|
|
logrus.SetOutput(ioutil.Discard)
|
|
|
|
// Use minimal config to reduce test setup time.
|
|
|
|
prevConfig := params.BeaconConfig().Copy()
|
|
|
|
defer params.OverrideBeaconConfig(prevConfig)
|
|
|
|
params.OverrideBeaconConfig(params.MinimalSpecConfig())
|
2020-05-05 08:39:38 +00:00
|
|
|
|
2020-11-14 02:28:14 +00:00
|
|
|
return m.Run()
|
|
|
|
}
|
|
|
|
os.Exit(run())
|
2020-05-05 08:39:38 +00:00
|
|
|
}
|