提交 25b36d10 作者: Jeromy

moved mock core node to core package

上级 c64add19
package testutil
package core
import (
ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go/sync"
bs "github.com/jbenet/go-ipfs/blockservice"
core "github.com/jbenet/go-ipfs/core"
ci "github.com/jbenet/go-ipfs/crypto"
mdag "github.com/jbenet/go-ipfs/merkledag"
nsys "github.com/jbenet/go-ipfs/namesys"
......@@ -12,10 +11,8 @@ import (
mdht "github.com/jbenet/go-ipfs/routing/mock"
)
var _ = core.IpfsNode{}
func NewMockNode() (*core.IpfsNode, error) {
nd := new(core.IpfsNode)
func NewMockNode() (*IpfsNode, error) {
nd := new(IpfsNode)
//Generate Identity
nd.Identity = &peer.Peer{ID: []byte("TESTING")}
......
......@@ -8,7 +8,7 @@ import (
"testing"
fstest "github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse/fs/fstestutil"
testutil "github.com/jbenet/go-ipfs/util/testutil"
"github.com/jbenet/go-ipfs/core"
)
func randBytes(size int) []byte {
......@@ -18,7 +18,7 @@ func randBytes(size int) []byte {
}
func TestIpnsBasicIO(t *testing.T) {
localnode, err := testutil.NewMockNode()
localnode, err := core.NewMockNode()
if err != nil {
t.Fatal(err)
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论