mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
dfc64121c6
* remove a few feature flags that are no longer needed * remove other unused flags * forgot a few more
30 lines
718 B
Go
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")
|
|
}
|
|
}
|