aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/lfs_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/lfs_test.go')
-rw-r--r--services/repository/lfs_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/repository/lfs_test.go b/services/repository/lfs_test.go
index e88befdfef..61348143d0 100644
--- a/services/repository/lfs_test.go
+++ b/services/repository/lfs_test.go
@@ -1,7 +1,7 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
-package repository
+package repository_test
import (
"bytes"
@@ -16,12 +16,13 @@ import (
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
+ repo_service "code.gitea.io/gitea/services/repository"
"github.com/stretchr/testify/assert"
)
func TestGarbageCollectLFSMetaObjects(t *testing.T) {
- assert.NoError(t, unittest.PrepareTestDatabase())
+ unittest.PrepareTestEnv(t)
setting.LFS.StartServer = true
err := storage.Init()
@@ -35,7 +36,7 @@ func TestGarbageCollectLFSMetaObjects(t *testing.T) {
lfsOid := storeObjectInRepo(t, repo.ID, &lfsContent)
// gc
- err = GarbageCollectLFSMetaObjects(context.Background(), GarbageCollectLFSMetaObjectsOptions{
+ err = repo_service.GarbageCollectLFSMetaObjects(context.Background(), repo_service.GarbageCollectLFSMetaObjectsOptions{
AutoFix: true,
OlderThan: time.Now().Add(7 * 24 * time.Hour).Add(5 * 24 * time.Hour),
UpdatedLessRecentlyThan: time.Now().Add(7 * 24 * time.Hour).Add(3 * 24 * time.Hour),