forked from TrueCloudLab/frostfs-sdk-go
[#349] object: Make patcher apply patching for split header
* Change `PatchApplier` interface: `ApplyAttributesPatch` -> `ApplyHeaderPatch`. Make `ApplyHeaderPatch` receive `ApplyHeaderPatchPrm` as parameter; * Fix `patcher`: apply patch for split header; * Fix `patcher` unit-tests. Add test-case for split header; * Extend `Patch` struct with `NewSplitHeader`; * Change `ObjectPatcher` interface for client: `PatchAttributes` -> `PatchHeader`. Fix `objectPatcher`. * Fix object transformer: since object header sets `SplitHeader` if it's passed. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
76265fe9be
commit
4d36a49d39
6 changed files with 259 additions and 20 deletions
|
@ -177,7 +177,7 @@ func TestObjectPatcher(t *testing.T) {
|
|||
maxChunkLen: test.maxChunkLen,
|
||||
}
|
||||
|
||||
success := patcher.PatchAttributes(context.Background(), nil, false)
|
||||
success := patcher.PatchHeader(context.Background(), PatchHeaderPrm{})
|
||||
require.True(t, success)
|
||||
|
||||
success = patcher.PatchPayload(context.Background(), test.rng, bytes.NewReader([]byte(test.patchPayload)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue