Reset marshal data on object.CutPayload
#202
4 changed files with 3 additions and 10 deletions
|
@ -225,14 +225,6 @@ func TestReservedRecords(t *testing.T) {
|
||||||
key: v2acl.FilterObjectType,
|
key: v2acl.FilterObjectType,
|
||||||
value: "TOMBSTONE",
|
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 {
|
for n, testCase := range testSuit {
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -3,7 +3,7 @@ module git.frostfs.info/TrueCloudLab/frostfs-sdk-go
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
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-contract v0.0.0-20230307110621-19a8ef2d02fb
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0
|
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0
|
||||||
git.frostfs.info/TrueCloudLab/hrw v1.2.1
|
git.frostfs.info/TrueCloudLab/hrw v1.2.1
|
||||||
|
@ -17,6 +17,7 @@ require (
|
||||||
go.uber.org/zap v1.24.0
|
go.uber.org/zap v1.24.0
|
||||||
google.golang.org/grpc v1.55.0
|
google.golang.org/grpc v1.55.0
|
||||||
google.golang.org/protobuf v1.30.0
|
google.golang.org/protobuf v1.30.0
|
||||||
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
@ -42,5 +43,4 @@ require (
|
||||||
golang.org/x/sys v0.8.0 // indirect
|
golang.org/x/sys v0.8.0 // indirect
|
||||||
golang.org/x/text v0.9.0 // indirect
|
golang.org/x/text v0.9.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
BIN
go.sum
BIN
go.sum
Binary file not shown.
|
@ -571,6 +571,7 @@ func (o *Object) CutPayload() *Object {
|
||||||
ov2 := new(object.Object)
|
ov2 := new(object.Object)
|
||||||
*ov2 = *(*object.Object)(o)
|
*ov2 = *(*object.Object)(o)
|
||||||
ov2.SetPayload(nil)
|
ov2.SetPayload(nil)
|
||||||
|
ov2.SetMarshalData(nil)
|
||||||
|
|
||||||
return (*Object)(ov2)
|
return (*Object)(ov2)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue