2019-11-15 18:56:26 +00:00
|
|
|
package endtoend
|
|
|
|
|
|
|
|
import (
|
2020-03-28 18:47:31 +00:00
|
|
|
"os"
|
|
|
|
"strconv"
|
2019-11-15 18:56:26 +00:00
|
|
|
"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"
|
2019-11-15 18:56:26 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/testutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestEndToEnd_MinimalConfig(t *testing.T) {
|
|
|
|
testutil.ResetCache()
|
|
|
|
params.UseMinimalConfig()
|
|
|
|
|
2020-03-28 18:47:31 +00:00
|
|
|
epochsToRun := 6
|
|
|
|
var err error
|
|
|
|
if epochs, ok := os.LookupEnv("E2E_EPOCHS"); ok {
|
|
|
|
epochsToRun, err = strconv.Atoi(epochs)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-22 23:04:23 +00:00
|
|
|
minimalConfig := &types.E2EConfig{
|
|
|
|
BeaconFlags: []string{"--minimal-config", "--custom-genesis-delay=10"},
|
|
|
|
ValidatorFlags: []string{"--minimal-config"},
|
2020-03-28 18:47:31 +00:00
|
|
|
EpochsToRun: uint64(epochsToRun),
|
2020-03-22 23:04:23 +00:00
|
|
|
TestSync: true,
|
|
|
|
TestSlasher: true,
|
|
|
|
Evaluators: []types.Evaluator{
|
2020-03-15 05:09:23 +00:00
|
|
|
ev.PeersConnect,
|
2019-11-15 18:56:26 +00:00
|
|
|
ev.ValidatorsAreActive,
|
|
|
|
ev.ValidatorsParticipating,
|
|
|
|
ev.FinalizationOccurs,
|
|
|
|
},
|
|
|
|
}
|
2020-03-22 23:04:23 +00:00
|
|
|
if err := e2eParams.Init(4); err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
2019-11-15 18:56:26 +00:00
|
|
|
runEndToEndTest(t, minimalConfig)
|
|
|
|
}
|