forked from TrueCloudLab/frostfs-sdk-go
[#268] client: Fix sequential PayloadPatch
calls
* The flag 'firstPayloadPatch' keeps its state after first `PatchPayload` that make other calls incorrectly set patch ranges. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
7d84d104fb
commit
f0c599d06d
2 changed files with 7 additions and 12 deletions
|
@ -170,12 +170,11 @@ func TestObjectPatcher(t *testing.T) {
|
|||
pk, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
|
||||
patcher := objectPatcher{
|
||||
client: &Client{},
|
||||
stream: m,
|
||||
addr: oidtest.Address(),
|
||||
key: pk,
|
||||
maxChunkLen: test.maxChunkLen,
|
||||
firstPatchPayload: true,
|
||||
client: &Client{},
|
||||
stream: m,
|
||||
addr: oidtest.Address(),
|
||||
key: pk,
|
||||
maxChunkLen: test.maxChunkLen,
|
||||
}
|
||||
|
||||
success := patcher.PatchAttributes(context.Background(), nil, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue