Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreapi: few more error check fixes #5935

Merged
merged 1 commit into from
Jan 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/coreapi/interface/tests/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion core/coreapi/interface/tests/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/coreapi/interface/tests/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down