2020-03-15 05:09:23 +00:00
|
|
|
package endtoend
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
ev "github.com/prysmaticlabs/prysm/endtoend/evaluators"
|
2020-03-22 23:04:23 +00:00
|
|
|
e2eParams "github.com/prysmaticlabs/prysm/endtoend/params"
|
|
|
|
"github.com/prysmaticlabs/prysm/endtoend/types"
|
2020-03-15 05:09:23 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/testutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEndToEnd_Slashing_MinimalConfig(t *testing.T) {
|
|
|
|
testutil.ResetCache()
|
|
|
|
params.UseMinimalConfig()
|
|
|
|
|
2020-03-22 23:04:23 +00:00
|
|
|
minimalConfig := &types.E2EConfig{
|
2020-05-09 20:11:10 +00:00
|
|
|
BeaconFlags: []string{"--minimal-config", "--custom-genesis-delay=25"},
|
2020-03-22 23:04:23 +00:00
|
|
|
ValidatorFlags: []string{"--minimal-config"},
|
2020-05-21 06:02:40 +00:00
|
|
|
EpochsToRun: 3,
|
2020-03-22 23:04:23 +00:00
|
|
|
TestSync: false,
|
|
|
|
TestSlasher: true,
|
|
|
|
Evaluators: []types.Evaluator{
|
2020-03-15 05:09:23 +00:00
|
|
|
ev.PeersConnect,
|
2020-04-15 21:20:58 +00:00
|
|
|
ev.HealthzCheck,
|
2020-03-15 05:09:23 +00:00
|
|
|
ev.ValidatorsSlashed,
|
|
|
|
ev.SlashedValidatorsLoseBalance,
|
|
|
|
ev.InjectDoubleVote,
|
2020-05-21 06:02:40 +00:00
|
|
|
ev.ProposeDoubleBlock,
|
2020-03-15 05:09:23 +00:00
|
|
|
},
|
|
|
|
}
|
2020-03-22 23:04:23 +00:00
|
|
|
if err := e2eParams.Init(2); err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2020-03-31 15:15:33 +00:00
|
|
|
|
2020-03-15 05:09:23 +00:00
|
|
|
runEndToEndTest(t, minimalConfig)
|
|
|
|
}
|