[#2179] test: Fix test TestEvacuateNetwork/multiple_shards,_evacuate_many

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-01-16 09:38:50 +03:00 committed by fyrchik
parent d4d2a8c865
commit 3d57f4c961

View file

@ -53,11 +53,22 @@ func newEngineEvacuate(t *testing.T, shardNum int, objPerShard int) (*StorageEng
require.NoError(t, e.Init()) require.NoError(t, e.Init())
objects := make([]*objectSDK.Object, 0, objPerShard*len(ids)) objects := make([]*objectSDK.Object, 0, objPerShard*len(ids))
for _, sh := range ids {
obj := generateObjectWithCID(t, cidtest.ID())
objects = append(objects, obj)
var putPrm shard.PutPrm
putPrm.SetObject(obj)
_, err := e.shards[sh.String()].Put(putPrm)
require.NoError(t, err)
}
for i := 0; ; i++ { for i := 0; ; i++ {
objects = append(objects, generateObjectWithCID(t, cidtest.ID())) objects = append(objects, generateObjectWithCID(t, cidtest.ID()))
var putPrm PutPrm var putPrm PutPrm
putPrm.WithObject(objects[i]) putPrm.WithObject(objects[len(objects)-1])
_, err := e.Put(putPrm) _, err := e.Put(putPrm)
require.NoError(t, err) require.NoError(t, err)