🐛 Fix deleted files are accesible
Some checks failed
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled

This commit is contained in:
Alejandro Alonso
2025-10-08 12:55:52 +02:00
committed by Andrey Antukh
parent 5717708b56
commit 2b7bd8fa5c
6 changed files with 46 additions and 39 deletions

View File

@@ -132,7 +132,6 @@
;; this will run pending task triggered by deleting user snapshot
(th/run-pending-tasks!)
;; this will
(let [res (th/run-task! :objects-gc {:deletion-threshold (cf/get-deletion-delay)})]
;; delete 2 snapshots and 2 file data entries
(t/is (= 4 (:processed res))))))))
@@ -179,7 +178,7 @@
(t/is (nil? (:error out)))
(t/is (true? (:result out)))
(let [snapshot (th/db-get :file-change {:id (:id snapshot)})]
(let [snapshot (th/db-get :file-change {:id (:id snapshot)} {::db/remove-deleted false})]
(t/is (= (:id profile-1) (:locked-by snapshot))))))
(t/testing "delete locked snapshot"