@cryptotaxi247 / kubo / commits / 25b36d100

moved mock core node to core package

Jeromy committed Oct 4, 2014 at 19:13 UTC 25b36d10008df4d0a0f6dfde4e1740cfd3ccdf53
2 files changed +5 -8
core/mock.go renamed
+3 -6
@@ -1,10 +1,9 @@
1 -package testutil
1 +package core
2
3 import (
4 ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
5 syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go/sync"
6 bs "github.com/jbenet/go-ipfs/blockservice"
7 - core "github.com/jbenet/go-ipfs/core"
7 ci "github.com/jbenet/go-ipfs/crypto"
8 mdag "github.com/jbenet/go-ipfs/merkledag"
9 nsys "github.com/jbenet/go-ipfs/namesys"
@@ -12,10 +11,8 @@ import (
11 mdht "github.com/jbenet/go-ipfs/routing/mock"
12 )
13
15 -var _ = core.IpfsNode{}
16 -
17 -func NewMockNode() (*core.IpfsNode, error) {
18 - nd := new(core.IpfsNode)
14 +func NewMockNode() (*IpfsNode, error) {
15 + nd := new(IpfsNode)
16
17 //Generate Identity
18 nd.Identity = &peer.Peer{ID: []byte("TESTING")}
fuse/ipns/ipns_test.go
+2 -2
@@ -8,7 +8,7 @@ import (
8 "testing"
9
10 fstest "github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse/fs/fstestutil"
11 - testutil "github.com/jbenet/go-ipfs/util/testutil"
11 + "github.com/jbenet/go-ipfs/core"
12 )
13
14 func randBytes(size int) []byte {
@@ -18,7 +18,7 @@ func randBytes(size int) []byte {
18 }
19
20 func TestIpnsBasicIO(t *testing.T) {
21 - localnode, err := testutil.NewMockNode()
21 + localnode, err := core.NewMockNode()
22 if err != nil {
23 t.Fatal(err)
24 }