summaryrefslogtreecommitdiffstats
path: root/models/unit_tests.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-07-30 09:59:10 +0800
committerGitHub <noreply@github.com>2019-07-30 09:59:10 +0800
commite7d4895732f22b523bd9e65a017c68636fb93002 (patch)
tree38811ceb272e7d680b9bf4385e50d654cea4fe64 /models/unit_tests.go
parent4d643a59db49ae47870326abb5fed8562e1d71a5 (diff)
downloadgitea-e7d4895732f22b523bd9e65a017c68636fb93002.tar.gz
gitea-e7d4895732f22b523bd9e65a017c68636fb93002.zip
Move commit repo action from models to repofiles package (#7645)
* move commit repo action from models to repofiles package * fix unit tests
Diffstat (limited to 'models/unit_tests.go')
-rw-r--r--models/unit_tests.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/unit_tests.go b/models/unit_tests.go
index 330dc5ee4e..9dadf2e128 100644
--- a/models/unit_tests.go
+++ b/models/unit_tests.go
@@ -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)