[#668] shard/test: Do not alter rootPath option

Supposedly, this was added to allow creating 2 different shards without
subtest. Now we use t.TempDir() everywhere, so this should not be a
problem.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-09-06 18:08:23 +03:00 committed by Evgenii Stratonikov
parent 36759f8434
commit a716db99db

View file

@ -54,7 +54,6 @@ func newCustomShard(t testing.TB, enableWriteCache bool, o shardOptions) *Shard
var sh *Shard
if enableWriteCache {
o.rootPath = filepath.Join(o.rootPath, "wc")
switch o.wcOpts.Type {
case writecacheconfig.TypeBBolt:
o.wcOpts.BBoltOptions = append(
@ -65,8 +64,6 @@ func newCustomShard(t testing.TB, enableWriteCache bool, o shardOptions) *Shard
[]writecachebadger.Option{writecachebadger.WithPath(filepath.Join(o.rootPath, "wcache"))},
o.wcOpts.BadgerOptions...)
}
} else {
o.rootPath = filepath.Join(o.rootPath, "nowc")
}
if o.bsOpts == nil {