Commit d416a143 authored by Hector Sanjuan's avatar Hector Sanjuan

Remove dependencies to go-unixfs

The remaining dependency was in tests. We can hardcode a CID instead of
requiring unixfs just to obtain an arbitrary CID that correspond to the empty
directory.
parent 67510bf0
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
offroute "github.com/ipfs/go-ipfs-routing/offline" offroute "github.com/ipfs/go-ipfs-routing/offline"
ipns "github.com/ipfs/go-ipns" ipns "github.com/ipfs/go-ipns"
path "github.com/ipfs/go-path" path "github.com/ipfs/go-path"
unixfs "github.com/ipfs/go-unixfs"
opts "github.com/ipfs/interface-go-ipfs-core/options/namesys" opts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
ci "github.com/libp2p/go-libp2p-core/crypto" ci "github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer" peer "github.com/libp2p/go-libp2p-core/peer"
...@@ -110,7 +109,8 @@ func TestPublishWithCache0(t *testing.T) { ...@@ -110,7 +109,8 @@ func TestPublishWithCache0(t *testing.T) {
}) })
nsys := NewNameSystem(routing, dst, 0) nsys := NewNameSystem(routing, dst, 0)
p, err := path.ParsePath(unixfs.EmptyDirNode().Cid().String()) // CID is arbitrary.
p, err := path.ParsePath("QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -142,7 +142,8 @@ func TestPublishWithTTL(t *testing.T) { ...@@ -142,7 +142,8 @@ func TestPublishWithTTL(t *testing.T) {
}) })
nsys := NewNameSystem(routing, dst, 128) nsys := NewNameSystem(routing, dst, 128)
p, err := path.ParsePath(unixfs.EmptyDirNode().Cid().String()) // CID is arbitrary.
p, err := path.ParsePath("QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment