[#222] Support Inhume and Delete in object service
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
21708d5408
commit
351e4b4592
5 changed files with 46 additions and 20 deletions
|
@ -105,7 +105,10 @@ func TestFormatValidator_Validate(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("tombstone content", func(t *testing.T) {
|
||||
require.Error(t, v.ValidateContent(object.TypeTombstone, nil))
|
||||
obj := NewRaw()
|
||||
obj.SetType(object.TypeTombstone)
|
||||
|
||||
require.Error(t, v.ValidateContent(obj.Object().SDK()))
|
||||
|
||||
addr := object.NewAddress()
|
||||
|
||||
|
@ -115,7 +118,9 @@ func TestFormatValidator_Validate(t *testing.T) {
|
|||
data, err := content.MarshalBinary()
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Error(t, v.ValidateContent(object.TypeTombstone, data))
|
||||
obj.SetPayload(data)
|
||||
|
||||
require.Error(t, v.ValidateContent(obj.Object().SDK()))
|
||||
|
||||
addr.SetContainerID(testContainerID(t))
|
||||
addr.SetObjectID(testObjectID(t))
|
||||
|
@ -123,6 +128,8 @@ func TestFormatValidator_Validate(t *testing.T) {
|
|||
data, err = content.MarshalBinary()
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, v.ValidateContent(object.TypeTombstone, data))
|
||||
obj.SetPayload(data)
|
||||
|
||||
require.NoError(t, v.ValidateContent(obj.Object().SDK()))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue