@cryptotaxi247 / kubo / commits / 80a898dd5

test: fail early on err to avoid an unrelated panic

This commit was moved from ipfs/interface-go-ipfs-core@df21c57e0f09b481b02f09cf3da20d17d25414e9 This commit was moved from ipfs/boxo@7a2fc1b8165e4079351f62ed4eec6a3fd9bd0aac

Michael Muré committed Jan 22, 2020 at 17:11 UTC 80a898dd552426b37593889eaa68b870f4c0cfe6
1 file changed +2 -2
core/coreiface/tests/block.go
+2 -2
@@ -156,7 +156,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
156
157 _, err = api.Block().Get(ctx, res.Path())
158 if err == nil {
159 - t.Error("expected err to exist")
159 + t.Fatal("expected err to exist")
160 }
161 if !strings.Contains(err.Error(), "blockservice: key not found") {
162 t.Errorf("unexpected error; %s", err.Error())
@@ -164,7 +164,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
164
165 err = api.Block().Rm(ctx, res.Path())
166 if err == nil {
167 - t.Error("expected err to exist")
167 + t.Fatal("expected err to exist")
168 }
169 if !strings.Contains(err.Error(), "blockstore: block not found") {
170 t.Errorf("unexpected error; %s", err.Error())