aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/indexer/stats/indexer_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/indexer/stats/indexer_test.go b/modules/indexer/stats/indexer_test.go
index 03b5e61fdc..b5c58ab25a 100644
--- a/modules/indexer/stats/indexer_test.go
+++ b/modules/indexer/stats/indexer_test.go
@@ -12,6 +12,7 @@ import (
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unittest"
+ "code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/queue"
"code.gitea.io/gitea/modules/setting"
@@ -26,6 +27,10 @@ func TestMain(m *testing.M) {
}
func TestRepoStatsIndex(t *testing.T) {
+ if err := git.Init(context.Background()); !assert.NoError(t, err) {
+ return
+ }
+
assert.NoError(t, unittest.PrepareTestDatabase())
setting.Cfg = ini.Empty()