Skip to content

Commit

Permalink
Merge pull request ipfs/interface-go-ipfs-core#57 from MichaelMure/fa…
Browse files Browse the repository at this point in the history
…tal-on-err

test: fail early on err to avoid an unrelated panic

This commit was moved from ipfs/interface-go-ipfs-core@d2f36ed
  • Loading branch information
Stebalien authored Jan 23, 2020
2 parents f782a1f + 7eeb4f3 commit 01bfc27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coreiface/tests/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {

_, err = api.Block().Get(ctx, res.Path())
if err == nil {
t.Error("expected err to exist")
t.Fatal("expected err to exist")
}
if !strings.Contains(err.Error(), "blockservice: key not found") {
t.Errorf("unexpected error; %s", err.Error())
}

err = api.Block().Rm(ctx, res.Path())
if err == nil {
t.Error("expected err to exist")
t.Fatal("expected err to exist")
}
if !strings.Contains(err.Error(), "blockstore: block not found") {
t.Errorf("unexpected error; %s", err.Error())
Expand Down

0 comments on commit 01bfc27

Please sign in to comment.