fix some tests
This commit was moved from ipfs/interface-go-ipfs-core@48dcedecd468c06e3321b4217b51f67180d07eec This commit was moved from ipfs/boxo@689e92b560ca2404db9edd1e8b65cd1a5e929881
Michael Muré committed
Nov 29, 2019 at 22:21 UTC
8eff544241ee85a27617c0146dcaaae8054e4b8d
2 files changed
+4
-4
core/coreiface/tests/block.go
+1
-1
@@ -227,7 +227,7 @@ func (tp *TestSuite) TestBlockPin(t *testing.T) {
227
228
pins, err := accPins(api.Pin().Ls(ctx))
229
if err != nil {
230
- return
230
+ t.Skip(err)
231
}
232
if len(pins) != 1 {
233
t.Fatal("expected 1 pin")
core/coreiface/tests/pin.go
+3
-3
@@ -160,7 +160,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
160
}
161
162
if list[0].Path().String() != path.IpldPath(nd3.Cid()).String() {
163
- t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpfsPath(nd2.Cid()).String())
163
+ t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpfsPath(nd3.Cid()).String())
164
}
165
166
list, err = accPins(api.Pin().Ls(ctx, opt.Pin.Type.Recursive()))
@@ -173,7 +173,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
173
}
174
175
if list[0].Path().String() != path.IpldPath(nd2.Cid()).String() {
176
- t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpldPath(nd3.Cid()).String())
176
+ t.Errorf("unexpected path, %s != %s", list[0].Path().String(), path.IpldPath(nd2.Cid()).String())
177
}
178
179
list, err = accPins(api.Pin().Ls(ctx, opt.Pin.Type.Indirect()))
@@ -186,7 +186,7 @@ func (tp *TestSuite) TestPinRecursive(t *testing.T) {
186
}
187
188
if list[0].Path().Cid().String() != p0.Cid().String() {
189
- t.Error("unexpected path")
189
+ t.Errorf("unexpected path, %s != %s", list[0].Path().Cid().String(), p0.Cid().String())
190
}
191
192
res, err := api.Pin().Verify(ctx)