[#327] tests: replace os.MkdirTemp with t.TempDir

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-05-05 10:38:59 +03:00 committed by Evgenii Stratonikov
parent cedd07bbc8
commit 973af12854
6 changed files with 9 additions and 36 deletions

View file

@ -2,7 +2,6 @@ package blobstor
import (
"context"
"os"
"testing"
objectCore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
@ -15,13 +14,9 @@ import (
)
func TestExists(t *testing.T) {
dir, err := os.MkdirTemp("", "frostfs*")
require.NoError(t, err)
t.Cleanup(func() { _ = os.RemoveAll(dir) })
const smallSizeLimit = 512
storages, _, largeFileStorage := defaultTestStorages(dir, smallSizeLimit)
storages, _, largeFileStorage := defaultTestStorages(t.TempDir(), smallSizeLimit)
b := New(WithStorages(storages))