Remove outdated code of metabase and localstore
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
869d9e571c
commit
a875d80491
41 changed files with 1725 additions and 3123 deletions
36
pkg/local_object_storage/metabase/containers_test.go
Normal file
36
pkg/local_object_storage/metabase/containers_test.go
Normal file
|
@ -0,0 +1,36 @@
|
|||
package meta_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestDB_Containers(t *testing.T) {
|
||||
db := newDB(t)
|
||||
defer releaseDB(db)
|
||||
|
||||
const N = 10
|
||||
|
||||
cids := make(map[string]int, N)
|
||||
|
||||
for i := 0; i < N; i++ {
|
||||
obj := generateRawObject(t)
|
||||
|
||||
cids[obj.ContainerID().String()] = 0
|
||||
|
||||
err := db.Put(obj.Object(), nil)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
lst, err := db.Containers()
|
||||
require.NoError(t, err)
|
||||
|
||||
for _, cid := range lst {
|
||||
i, ok := cids[cid.String()]
|
||||
require.True(t, ok)
|
||||
require.Equal(t, 0, i)
|
||||
|
||||
cids[cid.String()] = 1
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue