forked from TrueCloudLab/frostfs-node
[#895] test: Use t.Cleanup only for external resources
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
836818fb75
commit
47dcfa20f3
50 changed files with 164 additions and 95 deletions
|
@ -2,7 +2,6 @@ package blobovnicza
|
|||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
|
@ -15,11 +14,7 @@ func TestBlobovnicza_Get(t *testing.T) {
|
|||
filename := filepath.Join(t.TempDir(), "blob")
|
||||
|
||||
var blz *Blobovnicza
|
||||
|
||||
t.Cleanup(func() {
|
||||
blz.Close()
|
||||
os.RemoveAll(filename)
|
||||
})
|
||||
defer func() { require.NoError(t, blz.Close()) }()
|
||||
|
||||
fnInit := func(szLimit uint64) {
|
||||
if blz != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue