mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 22:37:51 +08:00
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:
parent
e3b5686710
commit
8eff544241
@ -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")
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user