diff options
Diffstat (limited to 'tests/integration/repo_search_test.go')
-rw-r--r-- | tests/integration/repo_search_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/integration/repo_search_test.go b/tests/integration/repo_search_test.go index 34328100fd..d113d1e57d 100644 --- a/tests/integration/repo_search_test.go +++ b/tests/integration/repo_search_test.go @@ -7,6 +7,7 @@ import ( "net/http" "testing" + "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" code_indexer "code.gitea.io/gitea/modules/indexer/code" "code.gitea.io/gitea/modules/setting" @@ -28,7 +29,7 @@ func resultFilenames(t testing.TB, doc *HTMLDoc) []string { func TestSearchRepo(t *testing.T) { defer tests.PrepareTestEnv(t)() - repo, err := repo_model.GetRepositoryByOwnerAndName("user2", "repo1") + repo, err := repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, "user2", "repo1") assert.NoError(t, err) executeIndexer(t, repo, code_indexer.UpdateRepoIndexer) @@ -38,7 +39,7 @@ func TestSearchRepo(t *testing.T) { setting.Indexer.IncludePatterns = setting.IndexerGlobFromString("**.txt") setting.Indexer.ExcludePatterns = setting.IndexerGlobFromString("**/y/**") - repo, err = repo_model.GetRepositoryByOwnerAndName("user2", "glob") + repo, err = repo_model.GetRepositoryByOwnerAndName(db.DefaultContext, "user2", "glob") assert.NoError(t, err) executeIndexer(t, repo, code_indexer.UpdateRepoIndexer) |