summaryrefslogtreecommitdiffstats
path: root/integrations/repo_search_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-12-09 03:15:35 +0800
committertechknowlogick <techknowlogick@gitea.io>2019-12-08 14:15:35 -0500
commitbe06dee04ce46de2da222fc9b2be4fc3b68b816d (patch)
tree01dacbca7efd24412c7762b41d34f08afcca3e87 /integrations/repo_search_test.go
parentbaf089e5b918fd967503e79022d3429b945359ef (diff)
downloadgitea-be06dee04ce46de2da222fc9b2be4fc3b68b816d.tar.gz
gitea-be06dee04ce46de2da222fc9b2be4fc3b68b816d.zip
Move code indexer related code to a new package (#9191)
* move code indexer related code to a new package * fix lint * fix tests * fix fmt * GetMaxID support interface parameter
Diffstat (limited to 'integrations/repo_search_test.go')
-rw-r--r--integrations/repo_search_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/integrations/repo_search_test.go b/integrations/repo_search_test.go
index eb843525fb..701013735c 100644
--- a/integrations/repo_search_test.go
+++ b/integrations/repo_search_test.go
@@ -10,6 +10,7 @@ import (
"time"
"code.gitea.io/gitea/models"
+ code_indexer "code.gitea.io/gitea/modules/indexer/code"
"code.gitea.io/gitea/modules/setting"
"github.com/PuerkitoBio/goquery"
@@ -34,7 +35,7 @@ func TestSearchRepo(t *testing.T) {
repo, err := models.GetRepositoryByOwnerAndName("user2", "repo1")
assert.NoError(t, err)
- executeIndexer(t, repo, models.UpdateRepoIndexer)
+ executeIndexer(t, repo, code_indexer.UpdateRepoIndexer)
testSearch(t, "/user2/repo1/search?q=Description&page=1", []string{"README.md"})
@@ -44,8 +45,8 @@ func TestSearchRepo(t *testing.T) {
repo, err = models.GetRepositoryByOwnerAndName("user2", "glob")
assert.NoError(t, err)
- executeIndexer(t, repo, models.DeleteRepoFromIndexer)
- executeIndexer(t, repo, models.UpdateRepoIndexer)
+ executeIndexer(t, repo, code_indexer.DeleteRepoFromIndexer)
+ executeIndexer(t, repo, code_indexer.UpdateRepoIndexer)
testSearch(t, "/user2/glob/search?q=loren&page=1", []string{"a.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1", []string{"x/b.txt"})