moved mock core node to core package

This commit is contained in:
Jeromy 2014-10-04 19:13:56 +00:00
parent c64add1959
commit 25b36d1000
2 changed files with 5 additions and 8 deletions

View File

@ -1,10 +1,9 @@
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")}

View File

@ -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)
}