Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #57 from MichaelMure/fatal-on-err
Browse files Browse the repository at this point in the history
test: fail early on err to avoid an unrelated panic
  • Loading branch information
Stebalien authored Jan 23, 2020
2 parents 7bbf5bb + df21c57 commit d2f36ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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 d2f36ed

Please sign in to comment.