forked from TrueCloudLab/frostfs-node
[#1686] blobstor: Add generic tests
This tests check that each blobstor component behaves similarly when same methods are being used. It is intended to serve as a specification for all future components. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
b2d4cc556e
commit
0b95a21701
11 changed files with 518 additions and 6 deletions
|
@ -26,10 +26,15 @@ func (b *Blobovniczas) Iterate(prm common.IteratePrm) (common.IterateRes, error)
|
|||
return fmt.Errorf("could not decompress object data: %w", err)
|
||||
}
|
||||
|
||||
return prm.Handler(common.IterationElement{
|
||||
Address: elem.Address(),
|
||||
ObjectData: data,
|
||||
StorageID: []byte(p),
|
||||
if prm.Handler != nil {
|
||||
return prm.Handler(common.IterationElement{
|
||||
Address: elem.Address(),
|
||||
ObjectData: data,
|
||||
StorageID: []byte(p),
|
||||
})
|
||||
}
|
||||
return prm.LazyHandler(elem.Address(), func() ([]byte, error) {
|
||||
return data, err
|
||||
})
|
||||
})
|
||||
subPrm.DecodeAddresses()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue