prysm-pulse/shared/featureconfig/config_test.go
terence tsao 5cd6f65a2c
Remove skip BLS verify flag (#7516)
* Remove skip BLS verify flag

* Update tests to use correct values

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-14 00:53:17 +00:00

33 lines
665 B
Go

package featureconfig
import (
"flag"
"testing"
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
"github.com/urfave/cli/v2"
)
func TestInitFeatureConfig(t *testing.T) {
cfg := &Flags{
MedallaTestnet: true,
}
Init(cfg)
c := Get()
assert.Equal(t, true, c.MedallaTestnet)
// Reset back to false for the follow up tests.
cfg = &Flags{MedallaTestnet: false}
Init(cfg)
}
func TestConfigureBeaconConfig(t *testing.T) {
app := cli.App{}
set := flag.NewFlagSet("test", 0)
set.Bool(MedallaTestnet.Name, true, "test")
context := cli.NewContext(&app, set, nil)
ConfigureBeaconChain(context)
c := Get()
assert.Equal(t, true, c.MedallaTestnet)
}