2020-05-02 04:03:50 +00:00
|
|
|
package beacon
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2020-12-04 16:10:07 +00:00
|
|
|
// Use minimal config to reduce test setup time.
|
|
|
|
prevConfig := params.BeaconConfig().Copy()
|
|
|
|
defer params.OverrideBeaconConfig(prevConfig)
|
|
|
|
params.OverrideBeaconConfig(params.MinimalSpecConfig())
|
2020-11-10 14:56:47 +00:00
|
|
|
|
2020-12-04 16:10:07 +00:00
|
|
|
resetFlags := flags.Get()
|
|
|
|
flags.Init(&flags.GlobalFlags{
|
|
|
|
MinimumSyncPeers: 30,
|
|
|
|
})
|
|
|
|
defer func() {
|
|
|
|
flags.Init(resetFlags)
|
|
|
|
}()
|
2020-05-05 08:39:38 +00:00
|
|
|
|
2020-12-04 16:10:07 +00:00
|
|
|
m.Run()
|
2020-05-02 04:03:50 +00:00
|
|
|
}
|