1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-25 23:21:54 +08:00

block cmd: go-path update

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2018-08-02 18:06:54 +02:00
committed by Steven Allen
parent daae93ad89
commit c3e69073e5

View File

@ -6,6 +6,7 @@ import (
"strings"
"testing"
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"
opt "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash"
@ -87,6 +88,19 @@ func TestBlockGet(t *testing.T) {
if string(d) != "Hello" {
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) {