mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-10 19:51:20 +00:00
5cd6f65a2c
* 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>
33 lines
665 B
Go
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)
|
|
}
|