summaryrefslogtreecommitdiffstats
path: root/tests/integration/create_no_session_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/create_no_session_test.go')
-rw-r--r--tests/integration/create_no_session_test.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/integration/create_no_session_test.go b/tests/integration/create_no_session_test.go
index c9b90974d7..c617b1828a 100644
--- a/tests/integration/create_no_session_test.go
+++ b/tests/integration/create_no_session_test.go
@@ -14,7 +14,6 @@ import (
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/setting"
- "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/tests"
@@ -70,13 +69,7 @@ func TestSessionFileCreation(t *testing.T) {
config.Provider = "file"
// Now create a temporaryDirectory
- tmpDir, err := os.MkdirTemp("", "sessions")
- assert.NoError(t, err)
- defer func() {
- if _, err := os.Stat(tmpDir); !os.IsNotExist(err) {
- _ = util.RemoveAll(tmpDir)
- }
- }()
+ tmpDir := t.TempDir()
config.ProviderConfig = tmpDir
newConfigBytes, err := json.Marshal(config)