diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-07-30 09:59:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-30 09:59:10 +0800 |
commit | e7d4895732f22b523bd9e65a017c68636fb93002 (patch) | |
tree | 38811ceb272e7d680b9bf4385e50d654cea4fe64 /models/unit_tests.go | |
parent | 4d643a59db49ae47870326abb5fed8562e1d71a5 (diff) | |
download | gitea-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.go | 7 |
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) |