forked from TrueCloudLab/frostfs-node
[#1437] shard: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c139892117
commit
16598553d9
38 changed files with 165 additions and 160 deletions
|
@ -33,7 +33,7 @@ func TestRemoveShard(t *testing.T) {
|
|||
|
||||
for id, remove := range mSh {
|
||||
if remove {
|
||||
e.removeShards(id)
|
||||
e.removeShards(context.Background(), id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,11 @@ func TestDisableShards(t *testing.T) {
|
|||
e, ids := te.engine, te.shardIDs
|
||||
defer func() { require.NoError(t, e.Close(context.Background())) }()
|
||||
|
||||
require.ErrorAs(t, e.DetachShards(ids), new(logicerr.Logical))
|
||||
require.ErrorAs(t, e.DetachShards(nil), new(logicerr.Logical))
|
||||
require.ErrorAs(t, e.DetachShards([]*shard.ID{}), new(logicerr.Logical))
|
||||
require.ErrorAs(t, e.DetachShards(context.Background(), ids), new(logicerr.Logical))
|
||||
require.ErrorAs(t, e.DetachShards(context.Background(), nil), new(logicerr.Logical))
|
||||
require.ErrorAs(t, e.DetachShards(context.Background(), []*shard.ID{}), new(logicerr.Logical))
|
||||
|
||||
require.NoError(t, e.DetachShards([]*shard.ID{ids[0]}))
|
||||
require.NoError(t, e.DetachShards(context.Background(), []*shard.ID{ids[0]}))
|
||||
|
||||
require.Equal(t, 1, len(e.shards))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue