2020-05-02 04:03:50 +00:00
|
|
|
package beacon
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
// Use minimal config to reduce test setup time.
|
2020-05-05 08:39:38 +00:00
|
|
|
prevConfig := params.BeaconConfig().Copy()
|
|
|
|
params.OverrideBeaconConfig(params.MinimalSpecConfig())
|
2020-05-02 04:03:50 +00:00
|
|
|
flags.Init(&flags.GlobalFlags{
|
2020-06-29 14:17:24 +00:00
|
|
|
MinimumSyncPeers: 30,
|
2020-05-02 04:03:50 +00:00
|
|
|
})
|
2020-05-05 08:39:38 +00:00
|
|
|
|
2020-05-02 04:03:50 +00:00
|
|
|
retVal := m.Run()
|
2020-05-05 08:39:38 +00:00
|
|
|
|
|
|
|
// Reset configuration.
|
|
|
|
params.OverrideBeaconConfig(prevConfig)
|
2020-05-02 04:03:50 +00:00
|
|
|
os.Exit(retVal)
|
|
|
|
}
|