Add configurable e2e epochs (#5235)

* Add configurable e2e epochs
* Merge refs/heads/master into configurable-test-epochs
* Merge refs/heads/master into configurable-test-epochs
This commit is contained in:
Preston Van Loon 2020-03-28 11:47:31 -07:00 committed by GitHub
parent a24546152b
commit f89d753275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,8 @@
package endtoend
import (
"os"
"strconv"
"testing"
ev "github.com/prysmaticlabs/prysm/endtoend/evaluators"
@ -14,10 +16,19 @@ func TestEndToEnd_MinimalConfig(t *testing.T) {
testutil.ResetCache()
params.UseMinimalConfig()
epochsToRun := 6
var err error
if epochs, ok := os.LookupEnv("E2E_EPOCHS"); ok {
epochsToRun, err = strconv.Atoi(epochs)
if err != nil {
t.Fatal(err)
}
}
minimalConfig := &types.E2EConfig{
BeaconFlags: []string{"--minimal-config", "--custom-genesis-delay=10"},
ValidatorFlags: []string{"--minimal-config"},
EpochsToRun: 6,
EpochsToRun: uint64(epochsToRun),
TestSync: true,
TestSlasher: true,
Evaluators: []types.Evaluator{