[#158] metabase: Implement operation of deleting a group of objects

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-09 13:09:09 +03:00 committed by Alex Vanin
parent 0021f1cc5f
commit 0cd05fdca5
2 changed files with 40 additions and 12 deletions

View file

@ -54,3 +54,18 @@ func BenchmarkDB_Delete(b *testing.B) {
}
})
}
func TestDB_DeleteObjects(t *testing.T) {
db := newDB(t)
defer releaseDB(db)
o1 := generateObject(t, testPrm{})
o2 := generateObject(t, testPrm{})
require.NoError(t, db.Put(o1))
require.NoError(t, db.Put(o2))
db.DeleteObjects(o1.Address(), o2.Address())
testSelect(t, db, object.SearchFilters{})
}