1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-26 12:32:31 +08:00

block cmd: use coreapi

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2018-08-02 09:48:52 +02:00
committed by Steven Allen
parent 66b54d9ac2
commit daae93ad89
5 changed files with 81 additions and 126 deletions

View File

@ -31,7 +31,7 @@ func TestMutablePath(t *testing.T) {
t.Error(err)
}
if blk.Mutable() {
if blk.Path().Mutable() {
t.Error("expected /ipld path to be immutable")
}
}
@ -129,7 +129,7 @@ func TestPathRoot(t *testing.T) {
t.Error(err)
}
obj, err := api.Dag().Put(ctx, strings.NewReader(`{"foo": {"/": "`+blk.Cid().String()+`"}}`))
obj, err := api.Dag().Put(ctx, strings.NewReader(`{"foo": {"/": "`+blk.Path().Cid().String()+`"}}`))
if err != nil {
t.Fatal(err)
}
@ -148,7 +148,7 @@ func TestPathRoot(t *testing.T) {
t.Error("unexpected path root")
}
if rp.Cid().String() != blk.Cid().String() {
if rp.Cid().String() != blk.Path().Cid().String() {
t.Error("unexpected path cid")
}
}