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

Commit

Permalink
test: add a false case test to blockstore parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Apr 5, 2022
1 parent a3b4935 commit 75f597a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,15 @@ func TestBlockstoreNotFoundMatchingIPLDErrNotFound(t *testing.T) {
"testing: %w the test",
"%w is wrong",
} {
var err error = blockstoreNotFoundMatchingIPLDErrNotFound{"blockstore: block not found"}
for _, err := range [...]error{
errors.New("network connection timeout"),
blockstoreNotFoundMatchingIPLDErrNotFound{"blockstore: block not found"},
} {
if wrap != "" {
err = fmt.Errorf(wrap, err)
}

if wrap != "" {
err = fmt.Errorf(wrap, err)
doParseIpldNotFoundTest(t, err)
}

doParseIpldNotFoundTest(t, err)
}
}

0 comments on commit 75f597a

Please sign in to comment.