diff options
Diffstat (limited to 'modules/setting/lfs_test.go')
-rw-r--r-- | modules/setting/lfs_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/setting/lfs_test.go b/modules/setting/lfs_test.go index 3313cae0eb..10c54fec0a 100644 --- a/modules/setting/lfs_test.go +++ b/modules/setting/lfs_test.go @@ -22,6 +22,30 @@ func Test_getStorageInheritNameSectionTypeForLFS(t *testing.T) { 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 ` |