summaryrefslogtreecommitdiffstats
path: root/models/unit_tests.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-09-29 17:05:13 +0800
committerGitHub <noreply@github.com>2020-09-29 12:05:13 +0300
commit3878e985b66cc6d4cb4d2b0e7406d5cf91af6191 (patch)
tree31229c29c2b57041d1941ec28b043165cbe4642d /models/unit_tests.go
parent4c6ac08182b5a14eaaffaafafef160bd90c4ae81 (diff)
downloadgitea-3878e985b66cc6d4cb4d2b0e7406d5cf91af6191.tar.gz
gitea-3878e985b66cc6d4cb4d2b0e7406d5cf91af6191.zip
Add default storage configurations (#12813)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/unit_tests.go')
-rw-r--r--models/unit_tests.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/models/unit_tests.go b/models/unit_tests.go
index e977f706f8..c4f9091a4b 100644
--- a/models/unit_tests.go
+++ b/models/unit_tests.go
@@ -67,9 +67,11 @@ func MainTest(m *testing.M, pathToGiteaRoot string) {
if err != nil {
fatalTestError("url.Parse: %v\n", err)
}
+ setting.Attachment.Storage.Type = setting.LocalStorageType
+ setting.Attachment.Storage.Path = filepath.Join(setting.AppDataPath, "attachments")
- setting.Attachment.Path = filepath.Join(setting.AppDataPath, "attachments")
- setting.LFS.ContentPath = filepath.Join(setting.AppDataPath, "lfs")
+ setting.LFS.Storage.Type = setting.LocalStorageType
+ setting.LFS.Storage.Path = filepath.Join(setting.AppDataPath, "lfs")
if err = storage.Init(); err != nil {
fatalTestError("storage.Init: %v\n", err)
}