mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +08:00
moved mock core node to core package
This commit is contained in:
parent
c64add1959
commit
25b36d1000
@ -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")}
|
||||
@ -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)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user