Commit b4e7753b authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi: few more error check fixes

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 071eb76b
......@@ -185,7 +185,7 @@ func (tp *provider) TestBatch(t *testing.T) {
}
_, err = api.Dag().Get(ctx, nds[0].Cid())
if err == nil || err.Error() != "merkledag: not found" {
if err == nil || !strings.Contains(err.Error(), "not found") {
t.Error(err)
}
......
......@@ -151,7 +151,7 @@ func (tp *provider) TestInvalidPathRemainder(t *testing.T) {
}
_, err = api.ResolvePath(ctx, p1)
if err == nil || err.Error() != "no such link found" {
if err == nil || !strings.Contains(err.Error(), "no such link found") {
t.Fatalf("unexpected error: %s", err)
}
}
......
......@@ -587,7 +587,7 @@ func (tp *provider) TestAddHashOnly(t *testing.T) {
if err == nil {
t.Fatal("expected an error")
}
if err.Error() != "blockservice: key not found" {
if !strings.Contains(err.Error(), "blockservice: key not found") {
t.Errorf("unxepected error: %s", err.Error())
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment