mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
81786159e9
* Move permanent flags to shared/cmd and make them accessible * Merge branch 'master' of github.com:prysmaticlabs/prysm into move-flags-to-cmd * Add test * Add comment * Fix gaz * Replace with new config * Gaz * replace * gaz * Merge branch 'master' into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Prestons comments * Nishant comments * Merge branch 'move-flags-to-cmd' of github.com:prysmaticlabs/prysm into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * Merge branch 'master' into move-flags-to-cmd * Merge refs/heads/master into move-flags-to-cmd * fmt
30 lines
638 B
Go
30 lines
638 B
Go
package featureconfig
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func TestInitFeatureConfig(t *testing.T) {
|
|
cfg := &Flags{
|
|
SkipBLSVerify: true,
|
|
}
|
|
Init(cfg)
|
|
if c := Get(); !c.SkipBLSVerify {
|
|
t.Errorf("SkipBLSVerify in FeatureFlags incorrect. Wanted true, got false")
|
|
}
|
|
}
|
|
|
|
func TestConfigureBeaconConfig(t *testing.T) {
|
|
app := cli.App{}
|
|
set := flag.NewFlagSet("test", 0)
|
|
set.Bool(skipBLSVerifyFlag.Name, true, "test")
|
|
context := cli.NewContext(&app, set, nil)
|
|
ConfigureBeaconChain(context)
|
|
if c := Get(); !c.SkipBLSVerify {
|
|
t.Errorf("SkipBLSVerify in FeatureFlags incorrect. Wanted true, got false")
|
|
}
|
|
}
|