forked from TrueCloudLab/frostfs-node
[#1016] frostfs-node: Fix gopls issues
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6dbb61caf4
commit
d6534fd755
16 changed files with 53 additions and 52 deletions
|
@ -50,7 +50,7 @@ func BenchmarkExists(b *testing.B) {
|
|||
func benchmarkExists(b *testing.B, shardNum int) {
|
||||
shards := make([]*shard.Shard, shardNum)
|
||||
for i := 0; i < shardNum; i++ {
|
||||
shards[i] = testNewShard(b, i)
|
||||
shards[i] = testNewShard(b)
|
||||
}
|
||||
|
||||
e := testNewEngine(b).setInitializedShards(b, shards...).engine
|
||||
|
@ -112,7 +112,7 @@ func (te *testEngineWrapper) setShardsNum(t testing.TB, num int) *testEngineWrap
|
|||
shards := make([]*shard.Shard, 0, num)
|
||||
|
||||
for i := 0; i < num; i++ {
|
||||
shards = append(shards, testNewShard(t, i))
|
||||
shards = append(shards, testNewShard(t))
|
||||
}
|
||||
|
||||
return te.setInitializedShards(t, shards...)
|
||||
|
@ -130,7 +130,7 @@ func (te *testEngineWrapper) setShardsNumOpts(t testing.TB, num int, shardOpts f
|
|||
|
||||
func (te *testEngineWrapper) setShardsNumAdditionalOpts(t testing.TB, num int, shardOpts func(id int) []shard.Option) *testEngineWrapper {
|
||||
for i := 0; i < num; i++ {
|
||||
defaultOpts := testDefaultShardOptions(t, i)
|
||||
defaultOpts := testDefaultShardOptions(t)
|
||||
opts := append(defaultOpts, shardOpts(i)...)
|
||||
id, err := te.engine.AddShard(context.Background(), opts...)
|
||||
require.NoError(t, err)
|
||||
|
@ -187,11 +187,11 @@ func newTestStorages(root string, smallSize uint64) ([]blobstor.SubStorage, *tes
|
|||
}, smallFileStorage, largeFileStorage
|
||||
}
|
||||
|
||||
func testNewShard(t testing.TB, id int, opts ...shard.Option) *shard.Shard {
|
||||
func testNewShard(t testing.TB, opts ...shard.Option) *shard.Shard {
|
||||
sid, err := generateShardID()
|
||||
require.NoError(t, err)
|
||||
|
||||
shardOpts := append([]shard.Option{shard.WithID(sid)}, testDefaultShardOptions(t, id)...)
|
||||
shardOpts := append([]shard.Option{shard.WithID(sid)}, testDefaultShardOptions(t)...)
|
||||
s := shard.New(append(shardOpts, opts...)...)
|
||||
|
||||
require.NoError(t, s.Open(context.Background()))
|
||||
|
@ -200,7 +200,7 @@ func testNewShard(t testing.TB, id int, opts ...shard.Option) *shard.Shard {
|
|||
return s
|
||||
}
|
||||
|
||||
func testDefaultShardOptions(t testing.TB, id int) []shard.Option {
|
||||
func testDefaultShardOptions(t testing.TB) []shard.Option {
|
||||
return []shard.Option{
|
||||
shard.WithLogger(test.NewLogger(t)),
|
||||
shard.WithBlobStorOptions(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue