fix some tests

This commit was moved from ipfs/interface-go-ipfs-core@48dcedecd4

This commit was moved from ipfs/boxo@689e92b560
This commit is contained in:
Michael Muré 2019-11-29 22:21:29 +01:00
parent e3b5686710
commit 8eff544241
2 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ func (tp *TestSuite) TestBlockPin(t *testing.T) {
pins, err := accPins(api.Pin().Ls(ctx))
if err != nil {
return
t.Skip(err)
}
if len(pins) != 1 {
t.Fatal("expected 1 pin")

View File

@ -160,7 +160,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
if list[0].Path().String() != path.IpldPath(nd3.Cid()).String() {
t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpfsPath(nd2.Cid()).String())
t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpfsPath(nd3.Cid()).String())
}
list, err = accPins(api.Pin().Ls(ctx, opt.Pin.Type.Recursive()))
@ -173,7 +173,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
if list[0].Path().String() != path.IpldPath(nd2.Cid()).String() {
t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpldPath(nd3.Cid()).String())
t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpldPath(nd2.Cid()).String())
}
list, err = accPins(api.Pin().Ls(ctx, opt.Pin.Type.Indirect()))
@ -186,7 +186,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
}
if list[0].Path().Cid().String() != p0.Cid().String() {
t.Error("unexpected path")
t.Errorf("unexpected path, %s != %s", list[0].Path().Cid().String(), p0.Cid().String())
}
res, err := api.Pin().Verify(ctx)