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.go4
-rw-r--r--modules/indexer/code/elastic_search_test.go5
-rw-r--r--modules/indexer/code/indexer_test.go5
3 files changed, 8 insertions, 6 deletions
diff --git a/modules/indexer/code/bleve_test.go b/modules/indexer/code/bleve_test.go
index 3d97e312f9..37ed2eb9f0 100644
--- a/modules/indexer/code/bleve_test.go
+++ b/modules/indexer/code/bleve_test.go
@@ -8,14 +8,14 @@ import (
"os"
"testing"
- "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)
func TestBleveIndexAndSearch(t *testing.T) {
- db.PrepareTestEnv(t)
+ unittest.PrepareTestEnv(t)
dir, err := os.MkdirTemp("", "bleve.index")
assert.NoError(t, err)
diff --git a/modules/indexer/code/elastic_search_test.go b/modules/indexer/code/elastic_search_test.go
index c9d2c297bb..fc58633f16 100644
--- a/modules/indexer/code/elastic_search_test.go
+++ b/modules/indexer/code/elastic_search_test.go
@@ -8,12 +8,13 @@ import (
"os"
"testing"
- "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unittest"
+
"github.com/stretchr/testify/assert"
)
func TestESIndexAndSearch(t *testing.T) {
- db.PrepareTestEnv(t)
+ unittest.PrepareTestEnv(t)
u := os.Getenv("TEST_INDEXER_CODE_ES_URL")
if u == "" {
diff --git a/modules/indexer/code/indexer_test.go b/modules/indexer/code/indexer_test.go
index 34930a84ca..b8fedcb323 100644
--- a/modules/indexer/code/indexer_test.go
+++ b/modules/indexer/code/indexer_test.go
@@ -8,12 +8,13 @@ import (
"path/filepath"
"testing"
- "code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unittest"
+
"github.com/stretchr/testify/assert"
)
func TestMain(m *testing.M) {
- db.MainTest(m, filepath.Join("..", "..", ".."))
+ unittest.MainTest(m, filepath.Join("..", "..", ".."))
}
func testIndexer(name string, t *testing.T, indexer Indexer) {