Reset marshal data on object.CutPayload #202

Merged
dstepanov-yadro merged 3 commits from dstepanov-yadro/frostfs-sdk-go:fix/cut_payload_reset_marshal_data into master 2024-09-04 19:51:15 +00:00
4 changed files with 3 additions and 10 deletions

View file

@ -225,14 +225,6 @@ func TestReservedRecords(t *testing.T) {
key: v2acl.FilterObjectType,
value: "TOMBSTONE",
},
{
f: func(r *Record) {
require.True(t, typ.FromString("STORAGE_GROUP"))
r.AddObjectTypeFilter(MatchStringEqual, *typ)
},
key: v2acl.FilterObjectType,
value: "STORAGE_GROUP",
},
}
for n, testCase := range testSuit {

4
go.mod
View file

@ -3,7 +3,7 @@ module git.frostfs.info/TrueCloudLab/frostfs-sdk-go
go 1.20
require (
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.15.1-0.20230802075510-964c3edb3f44
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240215114728-2a124b95bc02
git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0
git.frostfs.info/TrueCloudLab/hrw v1.2.1
@ -17,6 +17,7 @@ require (
go.uber.org/zap v1.24.0
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
gopkg.in/yaml.v3 v3.0.1
)
require (
@ -42,5 +43,4 @@ require (
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

BIN
go.sum

Binary file not shown.

View file

@ -571,6 +571,7 @@ func (o *Object) CutPayload() *Object {
ov2 := new(object.Object)
*ov2 = *(*object.Object)(o)
ov2.SetPayload(nil)
ov2.SetMarshalData(nil)
return (*Object)(ov2)
}