[#xx] Avoid manual management of files in tests

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-08-14 14:01:39 +03:00
parent 376f03a445
commit ae8be495c8
13 changed files with 17 additions and 79 deletions

View file

@ -2,7 +2,6 @@ package engine
import (
"context"
"os"
"strconv"
"testing"
"time"
@ -65,7 +64,6 @@ func TestLockUserScenario(t *testing.T) {
t.Cleanup(func() {
_ = e.Close()
_ = os.RemoveAll(t.Name())
})
lockerID := oidtest.ID()
@ -174,7 +172,6 @@ func TestLockExpiration(t *testing.T) {
t.Cleanup(func() {
_ = e.Close()
_ = os.RemoveAll(t.Name())
})
const lockerExpiresAfter = 13
@ -254,7 +251,6 @@ func TestLockForceRemoval(t *testing.T) {
require.NoError(t, e.Init(context.Background()))
t.Cleanup(func() {
_ = e.Close()
_ = os.RemoveAll(t.Name())
})
cnr := cidtest.ID()