File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "code.gitea.io/gitea/modules/setting/config"
2323 "code.gitea.io/gitea/modules/storage"
2424 "code.gitea.io/gitea/modules/util"
25+ repo_service "code.gitea.io/gitea/services/repository"
2526
2627 "github.com/stretchr/testify/assert"
2728 "xorm.io/xorm"
@@ -255,6 +256,7 @@ func PrepareTestDatabase() error {
255256// by tests that use the above MainTest(..) function.
256257func PrepareTestEnv (t testing.TB ) {
257258 assert .NoError (t , PrepareTestDatabase ())
259+ assert .NoError (t , repo_service .Init (context .Background ()))
258260 assert .NoError (t , util .RemoveAll (setting .RepoRootPath ))
259261 metaPath := filepath .Join (giteaRoot , "tests" , "gitea-repositories-meta" )
260262 assert .NoError (t , CopyDir (metaPath , setting .RepoRootPath ))
You can’t perform that action at this time.
0 commit comments