This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/solr_delete_history
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/dw/solr_delete_history by this 
push:
     new 3b658c332 fixup! fully delete history snapshots when deleting 
artifacts (incl remove from solr)
3b658c332 is described below

commit 3b658c3325dd144db2b4c28e99c26db9a53db950
Author: Dillon Walls <[email protected]>
AuthorDate: Wed Nov 15 14:21:06 2023 +0000

    fixup! fully delete history snapshots when deleting artifacts (incl remove 
from solr)
---
 Allura/allura/tests/model/test_artifact.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Allura/allura/tests/model/test_artifact.py 
b/Allura/allura/tests/model/test_artifact.py
index d62c01cd5..74070d838 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -170,6 +170,11 @@ class TestArtifact:
         ThreadLocalODMSession.flush_all()
         assert ss.text != pg.text
         assert pg.history().count() == 3
+        _id = pg._id
+        WM.PageHistory.query.find({'artifact_id': _id}).count() == 3
+        pg.delete()
+        ThreadLocalODMSession.flush_all()
+        WM.PageHistory.query.find({'artifact_id': _id}).count() == 0
 
     def test_messages_unknown_lookup(self):
         from bson import ObjectId

Reply via email to