forked from TrueCloudLab/frostfs-node
[#1969] local_object_storage: Add a type for logical errors
All logic errors are wrapped in `logicerr.Logical` type and do not affect shard error counter. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
98034005f1
commit
fcdbf5e509
42 changed files with 206 additions and 139 deletions
|
@ -97,12 +97,10 @@ func testShardGet(t *testing.T, hasWriteCache bool) {
|
|||
|
||||
_, err = testGet(t, sh, getPrm, hasWriteCache)
|
||||
|
||||
var expectedErr *objectSDK.SplitInfoError
|
||||
require.True(t, errors.As(err, &expectedErr))
|
||||
var si *objectSDK.SplitInfoError
|
||||
require.True(t, errors.As(err, &si))
|
||||
|
||||
si, ok := err.(*objectSDK.SplitInfoError)
|
||||
require.True(t, ok)
|
||||
_, ok = si.SplitInfo().Link()
|
||||
_, ok := si.SplitInfo().Link()
|
||||
require.False(t, ok)
|
||||
id1, _ := child.ID()
|
||||
id2, _ := si.SplitInfo().LastPart()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue