mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 17:22:18 +00:00
bbde2a6820
* add reset funcs * init -> TestMain for beacon config params * fixes build file * core/epoch spectests updated * core/blocks spectests updated * fix the rest of spectests * SetupTestConfigCleanup * revert copy() api * rever all cases of copy() * fixes spectests * updates fork_test * config_test update * fixes spectest/config_test * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge branch 'master' into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge branch 'master' into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests * Merge refs/heads/master into assert-no-side-effects-occur-in-tests
24 lines
586 B
Go
24 lines
586 B
Go
package spectest
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
)
|
|
|
|
func TestConfig(t *testing.T) {
|
|
if err := SetConfig(t, "minimal"); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if params.BeaconConfig().SlotsPerEpoch != 8 {
|
|
t.Errorf("Expected minimal config to be set, but got %d slots per epoch", params.BeaconConfig().SlotsPerEpoch)
|
|
}
|
|
|
|
if err := SetConfig(t, "mainnet"); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if params.BeaconConfig().SlotsPerEpoch != 32 {
|
|
t.Errorf("Expected mainnet config to be set, but got %d slots per epoch", params.BeaconConfig().SlotsPerEpoch)
|
|
}
|
|
}
|