forked from TrueCloudLab/frostfs-node
[#2179] test: Fix test TestEvacuateNetwork/multiple_shards,_evacuate_many
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d4d2a8c865
commit
3d57f4c961
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue