engine/test: Rework StorageEngine's test utils #1494

Merged
fyrchik merged 3 commits from a-savchuk/frostfs-node:prettify-engine-test-utils into master 2024-11-20 15:43:54 +00:00
2 changed files with 2 additions and 11 deletions
Showing only changes of commit c6066d6ee4 - Show all commits

View file

@ -49,11 +49,7 @@ func TestDeleteBigObject(t *testing.T) {
link.SetSplitID(splitID)
link.SetChildren(childIDs...)
s1 := testNewShard(t)
s2 := testNewShard(t)
s3 := testNewShard(t)
e := testNewEngine(t).setInitializedShards(t, s1, s2, s3).engine
e := testNewEngine(t).setShardsNum(t, 3).engine
e.log = test.NewLogger(t)
defer e.Close(context.Background())

View file

@ -43,12 +43,7 @@ func BenchmarkExists(b *testing.B) {
}
func benchmarkExists(b *testing.B, shardNum int) {
shards := make([]*shard.Shard, shardNum)
for i := range shardNum {
shards[i] = testNewShard(b)
}
e := testNewEngine(b).setInitializedShards(b, shards...).engine
e := testNewEngine(b).setShardsNum(b, shardNum).engine
defer func() { require.NoError(b, e.Close(context.Background())) }()
addr := oidtest.Address()