[#895] test: Use t.Cleanup only for external resources

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-01-09 16:26:43 +03:00 committed by Evgenii Stratonikov
parent 836818fb75
commit 47dcfa20f3
50 changed files with 164 additions and 95 deletions

View file

@ -19,6 +19,7 @@ func TestDB_Containers(t *testing.T) {
t.Parallel()
db := newDB(t)
defer func() { require.NoError(t, db.Close()) }()
const N = 10
@ -96,6 +97,7 @@ func TestDB_ContainersCount(t *testing.T) {
t.Parallel()
db := newDB(t)
defer func() { require.NoError(t, db.Close()) }()
const R, T, SG, L = 10, 11, 12, 13 // amount of object per type
@ -141,6 +143,7 @@ func TestDB_ContainerSize(t *testing.T) {
t.Parallel()
db := newDB(t)
defer func() { require.NoError(t, db.Close()) }()
const (
C = 3