forked from TrueCloudLab/frostfs-sdk-go
[#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>
This commit is contained in:
parent
1e1139f305
commit
d2cd9ebfbd
1 changed files with 3 additions and 1 deletions
|
@ -53,7 +53,9 @@ func TestErrors(t *testing.T) {
|
|||
|
||||
for i := range tc.errs {
|
||||
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 a new issue