forked from TrueCloudLab/frostfs-node
[#668] shard/test: Simplify shard construction
newCustomShard() has many parameters but only the first is obligatory. `enableWriteCache` is left as-is, because it directly affects the functionality. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
429f941cda
commit
268adb79cb
4 changed files with 55 additions and 44 deletions
|
@ -43,7 +43,7 @@ func TestWriteCacheObjectLoss(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
sh := newCustomShard(t, dir, true, wcOpts, nil, nil)
|
||||
sh := newCustomShard(t, true, shardOptions{rootPath: dir, wcOpts: wcOpts})
|
||||
|
||||
var errG errgroup.Group
|
||||
for i := range objects {
|
||||
|
@ -58,7 +58,7 @@ func TestWriteCacheObjectLoss(t *testing.T) {
|
|||
require.NoError(t, errG.Wait())
|
||||
require.NoError(t, sh.Close())
|
||||
|
||||
sh = newCustomShard(t, dir, true, wcOpts, nil, nil)
|
||||
sh = newCustomShard(t, true, shardOptions{rootPath: dir, wcOpts: wcOpts})
|
||||
defer releaseShard(sh, t)
|
||||
|
||||
var getPrm GetPrm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue