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
|
@ -23,6 +23,7 @@ func TestDB_SelectUserAttributes(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -147,6 +148,7 @@ func TestDB_SelectRootPhyParent(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -300,6 +302,7 @@ func TestDB_SelectInhume(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -334,6 +337,7 @@ func TestDB_SelectPayloadHash(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -404,6 +408,7 @@ func TestDB_SelectWithSlowFilters(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -511,6 +516,7 @@ func TestDB_SelectObjectID(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -626,6 +632,7 @@ func TestDB_SelectSplitID(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -682,6 +689,7 @@ func TestDB_SelectContainerID(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t)
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
cnr := cidtest.ID()
|
||||
|
||||
|
@ -729,6 +737,8 @@ func TestDB_SelectContainerID(t *testing.T) {
|
|||
func BenchmarkSelect(b *testing.B) {
|
||||
const objCount = 1000
|
||||
db := newDB(b)
|
||||
defer func() { require.NoError(b, db.Close()) }()
|
||||
|
||||
cid := cidtest.ID()
|
||||
|
||||
for i := 0; i < objCount; i++ {
|
||||
|
@ -769,6 +779,7 @@ func TestExpiredObjects(t *testing.T) {
|
|||
t.Parallel()
|
||||
|
||||
db := newDB(t, meta.WithEpochState(epochState{currEpoch}))
|
||||
defer func() { require.NoError(t, db.Close()) }()
|
||||
|
||||
checkExpiredObjects(t, db, func(exp, nonExp *objectSDK.Object) {
|
||||
cidExp, _ := exp.ContainerID()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue