prysm-pulse/testing/endtoend/minimal_slashing_e2e_test.go
Raul Jordan 4f31ba6489
Changes to E2E for Optimized Slasher (#9698)
* remaining slasher e2e changes

* testing gaz

* slash e2e

* deepsource

* gaz

* viz

* revert wait group changes

* comment

* lock around reset cache

* add slashing reason

* revert changes

* is sync

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2021-09-30 20:28:14 +00:00

37 lines
933 B
Go

package endtoend
import (
"testing"
"github.com/prysmaticlabs/prysm/config/params"
ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators"
e2eParams "github.com/prysmaticlabs/prysm/testing/endtoend/params"
"github.com/prysmaticlabs/prysm/testing/endtoend/types"
"github.com/prysmaticlabs/prysm/testing/require"
)
func TestEndToEnd_Slasher_MinimalConfig(t *testing.T) {
params.UseE2EConfig()
require.NoError(t, e2eParams.Init(e2eParams.StandardBeaconCount))
testConfig := &types.E2EConfig{
BeaconFlags: []string{
"--slasher",
},
ValidatorFlags: []string{},
EpochsToRun: 4,
TestSync: false,
TestDeposits: false,
Evaluators: []types.Evaluator{
ev.PeersConnect,
ev.HealthzCheck,
ev.ValidatorsSlashedAfterEpoch(4),
ev.SlashedValidatorsLoseBalanceAfterEpoch(4),
ev.InjectDoubleVoteOnEpoch(2),
ev.InjectDoubleBlockOnEpoch(2),
},
}
newTestRunner(t, testConfig).run()
}