From a716db99dbcb64fdc947ddfc1366d80a87dd1f8d Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 6 Sep 2023 18:08:23 +0300 Subject: [PATCH] [#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 --- pkg/local_object_storage/shard/shard_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/local_object_storage/shard/shard_test.go b/pkg/local_object_storage/shard/shard_test.go index 669ac287..5dcccd9c 100644 --- a/pkg/local_object_storage/shard/shard_test.go +++ b/pkg/local_object_storage/shard/shard_test.go @@ -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 {