mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-28 14:17:17 +00:00
452cadc286
* Cleanup featureconfig, make naming consistent * Fix rename * Change test package name
30 lines
637 B
Go
30 lines
637 B
Go
package featureconfig
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
func TestInitFeatureConfig(t *testing.T) {
|
|
cfg := &Flags{
|
|
MinimalConfig: true,
|
|
}
|
|
Init(cfg)
|
|
if c := Get(); !c.MinimalConfig {
|
|
t.Errorf("MinimalConfig in FeatureFlags incorrect. Wanted true, got false")
|
|
}
|
|
}
|
|
|
|
func TestConfigureBeaconConfig(t *testing.T) {
|
|
app := cli.NewApp()
|
|
set := flag.NewFlagSet("test", 0)
|
|
set.Bool(minimalConfigFlag.Name, true, "test")
|
|
context := cli.NewContext(app, set, nil)
|
|
ConfigureBeaconChain(context)
|
|
if c := Get(); !c.MinimalConfig {
|
|
t.Errorf("MinimalConfig in FeatureFlags incorrect. Wanted true, got false")
|
|
}
|
|
}
|