Commit c3e69073 authored by Łukasz Magiera's avatar Łukasz Magiera Committed by Steven Allen

block cmd: go-path update

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent daae93ad
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
"strings" "strings"
"testing" "testing"
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"
opt "github.com/ipfs/go-ipfs/core/coreapi/interface/options" opt "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
...@@ -87,6 +88,19 @@ func TestBlockGet(t *testing.T) { ...@@ -87,6 +88,19 @@ func TestBlockGet(t *testing.T) {
if string(d) != "Hello" { if string(d) != "Hello" {
t.Error("didn't get correct data back") t.Error("didn't get correct data back")
} }
p, err := coreiface.ParsePath("/ipfs/" + res.Path().Cid().String())
if err != nil {
t.Error(err)
}
rp, err := api.ResolvePath(ctx, p)
if err != nil {
t.Fatal(err)
}
if rp.Cid().String() != res.Path().Cid().String() {
t.Error("paths didn't match")
}
} }
func TestBlockRm(t *testing.T) { func TestBlockRm(t *testing.T) {
......
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