forked from TrueCloudLab/frostfs-node
[#668] shard/test: Release shard in t.Cleanup()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
382eb8a485
commit
429f941cda
6 changed files with 3 additions and 7 deletions
|
@ -31,10 +31,12 @@ func (s epochState) CurrentEpoch() uint64 {
|
|||
}
|
||||
|
||||
func newShard(t testing.TB, enableWriteCache bool) *Shard {
|
||||
return newCustomShard(t, t.TempDir(), enableWriteCache,
|
||||
sh := newCustomShard(t, t.TempDir(), enableWriteCache,
|
||||
writecacheconfig.Options{Type: writecacheconfig.TypeBBolt},
|
||||
nil,
|
||||
nil)
|
||||
t.Cleanup(func() { releaseShard(sh, t) })
|
||||
return sh
|
||||
}
|
||||
|
||||
func newCustomShard(t testing.TB, rootPath string, enableWriteCache bool, wcOpts writecacheconfig.Options, bsOpts []blobstor.Option, metaOptions []meta.Option) *Shard {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue