2018-07-14 02:15:37 +00:00
|
|
|
package node
|
|
|
|
|
|
|
|
import (
|
2018-07-14 19:48:42 +00:00
|
|
|
"flag"
|
2018-07-14 02:15:37 +00:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Test that the sharding node can build with default flag values.
|
|
|
|
func TestNode_Builds(t *testing.T) {
|
|
|
|
app := cli.NewApp()
|
2018-07-14 19:48:42 +00:00
|
|
|
set := flag.NewFlagSet("test", 0)
|
|
|
|
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
|
|
|
|
context := cli.NewContext(app, set, nil)
|
2018-07-14 02:15:37 +00:00
|
|
|
|
|
|
|
_, err := New(context)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Failed to create BeaconNode: %v", err)
|
|
|
|
}
|
|
|
|
}
|