aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-08-08 02:46:10 +0200
committerGitHub <noreply@github.com>2023-08-08 00:46:10 +0000
commit0c6ae61229bce9d9ad3d359cee927464968a2dd1 (patch)
treee7322e6b8ad0a34868e8d9cae445ffc24a3ca191 /tests/integration
parentc2b6897e35ccdebc4b49cfc7fb165ee654c8e55d (diff)
downloadgitea-0c6ae61229bce9d9ad3d359cee927464968a2dd1.tar.gz
gitea-0c6ae61229bce9d9ad3d359cee927464968a2dd1.zip
Allow package cleanup from admin page (#25307)
Until now expired package data gets deleted daily by a cronjob. The admin page shows the size of all packages and the size of unreferenced data. The users (#25035, #20631) expect the deletion of this data if they run the cronjob from the admin page but the job only deletes data older than 24h. This PR adds a new button which deletes all expired data. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/b3e35d73-9496-4fa7-a20c-e5d30b1f6850) --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/api_packages_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_packages_test.go b/tests/integration/api_packages_test.go
index cd981e9c73..e530b2c1ad 100644
--- a/tests/integration/api_packages_test.go
+++ b/tests/integration/api_packages_test.go
@@ -475,7 +475,7 @@ func TestPackageCleanup(t *testing.T) {
_, err = packages_model.GetInternalVersionByNameAndVersion(db.DefaultContext, user.ID, packages_model.TypeContainer, "cleanup-test", container_model.UploadVersion)
assert.NoError(t, err)
- err = packages_cleanup_service.Cleanup(db.DefaultContext, duration)
+ err = packages_cleanup_service.CleanupTask(db.DefaultContext, duration)
assert.NoError(t, err)
pbs, err = packages_model.FindExpiredUnreferencedBlobs(db.DefaultContext, duration)
@@ -610,7 +610,7 @@ func TestPackageCleanup(t *testing.T) {
pcr, err := packages_model.InsertCleanupRule(db.DefaultContext, c.Rule)
assert.NoError(t, err)
- err = packages_cleanup_service.Cleanup(db.DefaultContext, duration)
+ err = packages_cleanup_service.CleanupTask(db.DefaultContext, duration)
assert.NoError(t, err)
for _, v := range c.Versions {