Skip to content

Commit 2fd8d08

Browse files
committed
fix test
1 parent 527c049 commit 2fd8d08

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

modules/indexer/code/indexer_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
_ "code.gitea.io/gitea/models/activities"
2222

2323
"github.com/stretchr/testify/assert"
24+
"github.com/stretchr/testify/require"
2425

2526
_ "github.com/mattn/go-sqlite3"
2627
)
@@ -284,15 +285,11 @@ func TestBleveIndexAndSearch(t *testing.T) {
284285
dir := t.TempDir()
285286

286287
idx := bleve.NewIndexer(dir)
287-
_, err := idx.Init(context.Background())
288-
if err != nil {
289-
if idx != nil {
290-
idx.Close()
291-
}
292-
assert.FailNow(t, "Unable to create bleve indexer Error: %v", err)
293-
}
294288
defer idx.Close()
295289

290+
_, err := idx.Init(context.Background())
291+
require.NoError(t, err)
292+
296293
testIndexer("beleve", t, idx)
297294
}
298295

tests/gitea-repositories-meta/org42/search-by-path.git/refs/heads/.keep

Whitespace-only changes.

tests/gitea-repositories-meta/org42/search-by-path.git/refs/tag/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)