mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 21:57:16 +00:00
0544dd1f8e
* cmd tests * deposit util tests * feature config tests * hashutil tests * htr util tests * interop tests * ip util tests
29 lines
557 B
Go
29 lines
557 B
Go
package cmd
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func TestInitFeatureConfig(t *testing.T) {
|
|
cfg := &Flags{
|
|
MinimalConfig: true,
|
|
}
|
|
Init(cfg)
|
|
c := Get()
|
|
assert.Equal(t, true, c.MinimalConfig)
|
|
}
|
|
|
|
func TestConfigureBeaconConfig(t *testing.T) {
|
|
app := cli.App{}
|
|
set := flag.NewFlagSet("test", 0)
|
|
set.Bool(MinimalConfigFlag.Name, true, "test")
|
|
context := cli.NewContext(&app, set, nil)
|
|
ConfigureBeaconChain(context)
|
|
c := Get()
|
|
assert.Equal(t, true, c.MinimalConfig)
|
|
}
|