forked from TrueCloudLab/frostfs-node
[#1214] *: Use single Object
type in whole project
Remove `Object` and `RawObject` types from `pkg/core/object` package. Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the deprecated elements. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
19ad349b27
commit
7ccd1625af
100 changed files with 847 additions and 965 deletions
|
@ -25,7 +25,7 @@ func testShardDelete(t *testing.T, hasWriteCache bool) {
|
|||
|
||||
cid := cidtest.ID()
|
||||
|
||||
obj := generateRawObjectWithCID(t, cid)
|
||||
obj := generateObjectWithCID(t, cid)
|
||||
addAttribute(obj, "foo", "bar")
|
||||
|
||||
putPrm := new(shard.PutPrm)
|
||||
|
@ -34,11 +34,11 @@ func testShardDelete(t *testing.T, hasWriteCache bool) {
|
|||
t.Run("big object", func(t *testing.T) {
|
||||
addPayload(obj, 1<<20)
|
||||
|
||||
putPrm.WithObject(obj.Object())
|
||||
getPrm.WithAddress(obj.Object().Address())
|
||||
putPrm.WithObject(obj)
|
||||
getPrm.WithAddress(object.AddressOf(obj))
|
||||
|
||||
delPrm := new(shard.DeletePrm)
|
||||
delPrm.WithAddresses(obj.Object().Address())
|
||||
delPrm.WithAddresses(object.AddressOf(obj))
|
||||
|
||||
_, err := sh.Put(putPrm)
|
||||
require.NoError(t, err)
|
||||
|
@ -57,11 +57,11 @@ func testShardDelete(t *testing.T, hasWriteCache bool) {
|
|||
obj.SetID(generateOID())
|
||||
addPayload(obj, 1<<5)
|
||||
|
||||
putPrm.WithObject(obj.Object())
|
||||
getPrm.WithAddress(obj.Object().Address())
|
||||
putPrm.WithObject(obj)
|
||||
getPrm.WithAddress(object.AddressOf(obj))
|
||||
|
||||
delPrm := new(shard.DeletePrm)
|
||||
delPrm.WithAddresses(obj.Object().Address())
|
||||
delPrm.WithAddresses(object.AddressOf(obj))
|
||||
|
||||
_, err := sh.Put(putPrm)
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue