forked from NYANDEV/forgejo
[GITEA] do not use deprecatedSettingFatal for cosmetic reasons
It breaks existing instances that would otherwise work perfectly fine. Failing to start an instance should only happen when there is a compelling reason to do so, for instance if the `app.ini` could not be modified in a way that is backward compatible. If the only motivation is to remove the setting for cosmetic reason, it must not be fatal. (cherry picked from commit c09ef82e9a4a1f450adce46fe7adcf733d8cc9da)
This commit is contained in:
parent
f255e50903
commit
e80aaa11d9
3 changed files with 32 additions and 7 deletions
|
@ -21,6 +21,30 @@ func Test_getStorageInheritNameSectionTypeForLFS(t *testing.T) {
|
|||
assert.EqualValues(t, "minio", LFS.Storage.Type)
|
||||
assert.EqualValues(t, "lfs/", LFS.Storage.MinioConfig.BasePath)
|
||||
|
||||
iniStr = `
|
||||
[server]
|
||||
LFS_CONTENT_PATH = path_ignored
|
||||
[lfs]
|
||||
PATH = path_used
|
||||
`
|
||||
cfg, err = NewConfigProviderFromData(iniStr)
|
||||
assert.NoError(t, err)
|
||||
assert.NoError(t, loadLFSFrom(cfg))
|
||||
|
||||
assert.EqualValues(t, "local", LFS.Storage.Type)
|
||||
assert.Contains(t, LFS.Storage.Path, "path_used")
|
||||
|
||||
iniStr = `
|
||||
[server]
|
||||
LFS_CONTENT_PATH = deprecatedpath
|
||||
`
|
||||
cfg, err = NewConfigProviderFromData(iniStr)
|
||||
assert.NoError(t, err)
|
||||
assert.NoError(t, loadLFSFrom(cfg))
|
||||
|
||||
assert.EqualValues(t, "local", LFS.Storage.Type)
|
||||
assert.Contains(t, LFS.Storage.Path, "deprecatedpath")
|
||||
|
||||
iniStr = `
|
||||
[storage.lfs]
|
||||
STORAGE_TYPE = minio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue