prysm-pulse/shared/featureconfig/config_test.go
Preston Van Loon dfc64121c6
Remove unused feature flags (#3002)
* remove a few feature flags that are no longer needed

* remove other unused flags

* forgot a few more
2019-07-19 21:27:35 -04:00

30 lines
718 B
Go

package featureconfig
import (
"flag"
"testing"
"github.com/urfave/cli"
)
func TestInitFeatureConfig(t *testing.T) {
cfg := &FeatureFlagConfig{
NoGenesisDelay: true,
}
InitFeatureConfig(cfg)
if c := FeatureConfig(); !c.NoGenesisDelay {
t.Errorf("NoGenesisDelay in FeatureFlags incorrect. Wanted true, got false")
}
}
func TestConfigureBeaconConfig(t *testing.T) {
app := cli.NewApp()
set := flag.NewFlagSet("test", 0)
set.Bool(NoGenesisDelayFlag.Name, true, "enable attestation verification")
context := cli.NewContext(app, set, nil)
ConfigureBeaconFeatures(context)
if c := FeatureConfig(); !c.NoGenesisDelay {
t.Errorf("NoGenesisDelay in FeatureFlags incorrect. Wanted true, got false")
}
}