[#278] client: Increase depth of error wrapping in `IsErr*` tests
Wrap test error twice just to be sure error unwrapping goes deep. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>remotes/fyrchik/update-contracts
parent
1e1139f305
commit
d2cd9ebfbd
|
@ -53,7 +53,9 @@ func TestErrors(t *testing.T) {
|
||||||
|
|
||||||
for i := range tc.errs {
|
for i := range tc.errs {
|
||||||
require.True(t, tc.check(tc.errs[i]), tc.errs[i])
|
require.True(t, tc.check(tc.errs[i]), tc.errs[i])
|
||||||
require.True(t, tc.check(fmt.Errorf("some context: %w", tc.errs[i])), tc.errs[i])
|
require.True(t, tc.check(fmt.Errorf("top-level context: :%w",
|
||||||
|
fmt.Errorf("inner context: %w", tc.errs[i])),
|
||||||
|
), tc.errs[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue