aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/code')
-rw-r--r--modules/indexer/code/bleve_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/indexer/code/bleve_test.go b/modules/indexer/code/bleve_test.go
index 37ed2eb9f0..a34d54bc0e 100644
--- a/modules/indexer/code/bleve_test.go
+++ b/modules/indexer/code/bleve_test.go
@@ -5,11 +5,9 @@
package code
import (
- "os"
"testing"
"code.gitea.io/gitea/models/unittest"
- "code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)
@@ -17,13 +15,7 @@ import (
func TestBleveIndexAndSearch(t *testing.T) {
unittest.PrepareTestEnv(t)
- dir, err := os.MkdirTemp("", "bleve.index")
- assert.NoError(t, err)
- if err != nil {
- assert.Fail(t, "Unable to create temporary directory")
- return
- }
- defer util.RemoveAll(dir)
+ dir := t.TempDir()
idx, _, err := NewBleveIndexer(dir)
if err != nil {