2018-06-06 02:38:16 +00:00
|
|
|
package node
|
|
|
|
|
2018-06-17 02:26:03 +00:00
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"testing"
|
|
|
|
|
2018-07-07 17:23:19 +00:00
|
|
|
"github.com/prysmaticlabs/geth-sharding/sharding"
|
2018-06-17 02:26:03 +00:00
|
|
|
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
|
|
)
|
2018-06-06 02:38:16 +00:00
|
|
|
|
|
|
|
// Verifies that ShardEthereum implements the Node interface.
|
|
|
|
var _ = sharding.Node(&ShardEthereum{})
|
2018-06-17 02:26:03 +00:00
|
|
|
|
|
|
|
// Test that the sharding node can build with default flag values.
|
|
|
|
func TestNode_Builds(t *testing.T) {
|
|
|
|
app := cli.NewApp()
|
|
|
|
set := flag.NewFlagSet("test", 0)
|
|
|
|
|
|
|
|
context := cli.NewContext(app, set, nil)
|
|
|
|
|
|
|
|
_, err := New(context)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatalf("Failed to create ShardEthereum: %v", err)
|
|
|
|
}
|
|
|
|
}
|