Move commit repo action from models to repofiles package (#7645)

* move commit repo action from models to repofiles package

* fix unit tests
This commit is contained in:
Lunny Xiao 2019-07-30 09:59:10 +08:00 committed by GitHub
parent 4d643a59db
commit e7d4895732
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 348 additions and 310 deletions

View file

@ -65,6 +65,13 @@ func MainTest(m *testing.M, pathToGiteaRoot string) {
fatalTestError("url.Parse: %v\n", err)
}
if err = removeAllWithRetry(setting.RepoRootPath); err != nil {
fatalTestError("os.RemoveAll: %v\n", err)
}
if err = com.CopyDir(filepath.Join(pathToGiteaRoot, "integrations", "gitea-repositories-meta"), setting.RepoRootPath); err != nil {
fatalTestError("com.CopyDir: %v\n", err)
}
exitStatus := m.Run()
if err = removeAllWithRetry(setting.RepoRootPath); err != nil {
fatalTestError("os.RemoveAll: %v\n", err)