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
|
@ -29,7 +29,7 @@ func Test_GCDropsLockedExpiredSimpleObject(t *testing.T) {
|
|||
wcOpts := writecacheconfig.Options{
|
||||
Type: writecacheconfig.TypeBBolt,
|
||||
}
|
||||
sh := newCustomShard(t, t.TempDir(), false, wcOpts, nil, []meta.Option{meta.WithEpochState(epoch)})
|
||||
sh := newCustomShard(t, false, shardOptions{rootPath: t.TempDir(), wcOpts: wcOpts, metaOptions: []meta.Option{meta.WithEpochState(epoch)}})
|
||||
|
||||
t.Cleanup(func() {
|
||||
releaseShard(sh, t)
|
||||
|
@ -129,7 +129,7 @@ func Test_GCDropsLockedExpiredComplexObject(t *testing.T) {
|
|||
wcOpts := writecacheconfig.Options{
|
||||
Type: writecacheconfig.TypeBBolt,
|
||||
}
|
||||
sh := newCustomShard(t, t.TempDir(), false, wcOpts, nil, []meta.Option{meta.WithEpochState(epoch)})
|
||||
sh := newCustomShard(t, false, shardOptions{rootPath: t.TempDir(), wcOpts: wcOpts, metaOptions: []meta.Option{meta.WithEpochState(epoch)}})
|
||||
|
||||
t.Cleanup(func() {
|
||||
releaseShard(sh, t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue