summaryrefslogtreecommitdiffstats
path: root/integrations/lfs_getobject_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-09-08 23:45:10 +0800
committerGitHub <noreply@github.com>2020-09-08 23:45:10 +0800
commit7a5465fc56f79f5fc3c32547c89a80b7ebb24c8f (patch)
treec663ce5f0f37e13d950384fd76428c422adfb06d /integrations/lfs_getobject_test.go
parente4b3f35b8d68d6409a280a8e644759e10b091cb1 (diff)
downloadgitea-7a5465fc56f79f5fc3c32547c89a80b7ebb24c8f.tar.gz
gitea-7a5465fc56f79f5fc3c32547c89a80b7ebb24c8f.zip
LFS support to be stored on minio (#12518)
* LFS support to be stored on minio * Fix test * Fix lint * Fix lint * Fix check * Fix test * Update documents and add migration for LFS * Fix some bugs
Diffstat (limited to 'integrations/lfs_getobject_test.go')
-rw-r--r--integrations/lfs_getobject_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/integrations/lfs_getobject_test.go b/integrations/lfs_getobject_test.go
index 45e94406a5..431c7ed9e8 100644
--- a/integrations/lfs_getobject_test.go
+++ b/integrations/lfs_getobject_test.go
@@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/storage"
"gitea.com/macaron/gzip"
gzipp "github.com/klauspost/compress/gzip"
@@ -49,8 +50,10 @@ func storeObjectInRepo(t *testing.T, repositoryID int64, content *[]byte) string
lfsID++
lfsMetaObject, err = models.NewLFSMetaObject(lfsMetaObject)
assert.NoError(t, err)
- contentStore := &lfs.ContentStore{BasePath: setting.LFS.ContentPath}
- if !contentStore.Exists(lfsMetaObject) {
+ contentStore := &lfs.ContentStore{ObjectStorage: storage.LFS}
+ exist, err := contentStore.Exists(lfsMetaObject)
+ assert.NoError(t, err)
+ if !exist {
err := contentStore.Put(lfsMetaObject, bytes.NewReader(*content))
assert.NoError(t, err)
}