Revert "Move Slasher E2E To Scenario Test" (#10986)

This reverts commit 65900115fc.

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Raul Jordan
2022-07-06 13:03:30 +00:00
committed by GitHub
parent 3a957c567f
commit c9a366c36a
4 changed files with 45 additions and 24 deletions

View File

@@ -52,6 +52,7 @@ go_test(
"endtoend_setup_test.go",
"endtoend_test.go",
"minimal_e2e_test.go",
"minimal_slashing_e2e_test.go",
"slasher_simulator_e2e_test.go",
],
args = ["-test.v"],

View File

@@ -3,7 +3,6 @@ package endtoend
import (
"testing"
ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators"
"github.com/prysmaticlabs/prysm/testing/endtoend/types"
)
@@ -19,20 +18,6 @@ func TestEndToEnd_MinimalConfig_Web3Signer(t *testing.T) {
e2eMinimal(t, types.WithRemoteSigner()).run()
}
func TestEndToEnd_MinimalConfig_Slasher(t *testing.T) {
e2eMinimal(
t,
types.WithSlasher(
ev.PeersConnect,
ev.HealthzCheck,
ev.ValidatorsSlashedAfterEpoch(4),
ev.SlashedValidatorsLoseBalanceAfterEpoch(4),
ev.InjectDoubleVoteOnEpoch(2),
ev.InjectDoubleBlockOnEpoch(2),
),
).run()
}
func TestEndToEnd_ScenarioRun_EEOffline(t *testing.T) {
t.Skip("TODO(#10242) Prysm is current unable to handle an offline e2e")
runner := e2eMinimal(t)

View File

@@ -0,0 +1,44 @@
package endtoend
import (
"fmt"
"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.SetupTestConfigCleanup(t)
params.OverrideBeaconConfig(params.E2ETestConfig().Copy())
require.NoError(t, e2eParams.Init(t, e2eParams.StandardBeaconCount))
tracingPort := e2eParams.TestParams.Ports.JaegerTracingPort
tracingEndpoint := fmt.Sprintf("127.0.0.1:%d", tracingPort)
testConfig := &types.E2EConfig{
BeaconFlags: []string{
"--slasher",
},
ValidatorFlags: []string{},
EpochsToRun: 4,
TestSync: false,
TestFeature: false,
TestDeposits: false,
Evaluators: []types.Evaluator{
ev.PeersConnect,
ev.HealthzCheck,
ev.ValidatorsSlashedAfterEpoch(4),
ev.SlashedValidatorsLoseBalanceAfterEpoch(4),
ev.InjectDoubleVoteOnEpoch(2),
ev.InjectDoubleBlockOnEpoch(2),
},
EvalInterceptor: defaultInterceptor,
TracingSinkEndpoint: tracingEndpoint,
}
newTestRunner(t, testConfig).run()
}

View File

@@ -23,14 +23,6 @@ func WithRemoteSigner() E2EConfigOpt {
}
}
func WithSlasher(evs ...Evaluator) E2EConfigOpt {
return func(cfg *E2EConfig) {
cfg.UseSlasher = true
cfg.Evaluators = evs
cfg.BeaconFlags = append(cfg.BeaconFlags, "--slasher")
}
}
func WithCheckpointSync() E2EConfigOpt {
return func(cfg *E2EConfig) {
cfg.TestCheckpointSync = true
@@ -45,7 +37,6 @@ type E2EConfig struct {
UsePrysmShValidator bool
UsePprof bool
UseWeb3RemoteSigner bool
UseSlasher bool
TestDeposits bool
UseFixedPeerIDs bool
UseValidatorCrossClient bool