2020-05-02 04:03:50 +00:00
|
|
|
package beacon
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2021-03-02 19:36:03 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags"
|
2021-09-21 19:59:25 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/config/params"
|
2020-05-02 04:03:50 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
}
|