[#1175] object/fmt: Handle LOCK
objects
Make `FormatValidator.ValidateContent` to verify payload of `LOCK` objects. Pass locked objects to `Locker` interface. Require from `Locker.Lock` to return `apistatus.IrregularObjectLock` error on a corresponding condition. Also add error return to `DeleteHandler.DeleteObjects` method. Require from method to return `apistatus.ObjectLocked` error on a corresponding condition. Adopt implementations. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d163008b63
commit
ced854bc2e
5 changed files with 63 additions and 18 deletions
|
@ -37,7 +37,7 @@ func TestDB_Lock(t *testing.T) {
|
|||
err := meta.Put(db, obj, nil)
|
||||
require.NoError(t, err, typ)
|
||||
|
||||
var e apistatus.IrregularObjectLock
|
||||
var e apistatus.LockNonRegularObject
|
||||
|
||||
// try to lock it
|
||||
err = db.Lock(cnr, *oidtest.ID(), []oid.ID{*obj.ID()})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue