mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
test: add a false case test to blockstore parsing
This commit was moved from ipfs/go-ipfs-http-client@75f597aa16
This commit is contained in:
parent
54f6e90870
commit
f2f2109bc1
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user