Skip to content

Commit ff9a1d1

Browse files
committed
Fix test
1 parent 8881e1b commit ff9a1d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

models/unit_tests.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ func MainTest(m *testing.M, pathToGiteaRoot string) {
6767
if err != nil {
6868
fatalTestError("url.Parse: %v\n", err)
6969
}
70+
setting.Attachment.Storage.Type = setting.LocalStorageType
71+
setting.Attachment.Storage.Path = filepath.Join(setting.AppDataPath, "attachments")
7072

71-
setting.Attachment.Path = filepath.Join(setting.AppDataPath, "attachments")
72-
setting.LFS.Path = filepath.Join(setting.AppDataPath, "lfs")
73+
setting.LFS.Storage.Type = setting.LocalStorageType
74+
setting.LFS.Storage.Path = filepath.Join(setting.AppDataPath, "lfs")
7375
if err = storage.Init(); err != nil {
7476
fatalTestError("storage.Init: %v\n", err)
7577
}

0 commit comments

Comments
 (0)