forked from TrueCloudLab/frostfs-node
[#1385] metabase: Validate that tombstone and target have the same container ID
Target container ID is taken from tombstone: cmd/frostfs-node/object.go:507 Also object of type `TOMBSTONE` contains objectID, so tombstone and tombstoned object must have the same containerID. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
8434f3dbfc
commit
76268e3ea2
16 changed files with 108 additions and 52 deletions
|
@ -67,7 +67,7 @@ func TestDB_Containers(t *testing.T) {
|
|||
|
||||
assertContains(cnrs, cnr)
|
||||
|
||||
require.NoError(t, metaInhume(db, object.AddressOf(obj), oidtest.Address()))
|
||||
require.NoError(t, metaInhume(db, object.AddressOf(obj), oidtest.ID()))
|
||||
|
||||
cnrs, err = db.Containers(context.Background())
|
||||
require.NoError(t, err)
|
||||
|
@ -164,7 +164,7 @@ func TestDB_ContainerSize(t *testing.T) {
|
|||
require.NoError(t, metaInhume(
|
||||
db,
|
||||
object.AddressOf(obj),
|
||||
oidtest.Address(),
|
||||
oidtest.ID(),
|
||||
))
|
||||
|
||||
volume -= int(obj.PayloadSize())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue