about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-29 09:57:50 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-29 10:00:02 +0000
commit623136f21efe82bf88fcd7fc4c733502c59f63e8 (patch)
treeb8f7ef13ff242fbde2ee84a03e284bbca93f475a /t
parentcc44146289bd38a5f95d5dbab8b28016f2599fcb (diff)
downloadpublic-inbox-623136f21efe82bf88fcd7fc4c733502c59f63e8.tar.gz
Purging existing messages is fairly straightforward since we can
take advantage of Xapian and lookup the git object_id with it.

Unfortunately, purging an already "removed" message (which is
no longer in Xapian) is not as easy and we'll need to expose
->purge_oids to purge by the git object_id (currently SHA-1).

Furthermore, we expire reflogs and prune in hopes a dumb HTTP
client won't get the object.
Diffstat (limited to 't')
-rw-r--r--t/v2writable.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/v2writable.t b/t/v2writable.t
index c48f060e..0eda432a 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -231,4 +231,11 @@ EOF
         ok(!$@, '->done is idempotent');
 }
 
+{
+        ok($im->add($mime), 'add message to be purged');
+        local $SIG{__WARN__} = sub {};
+        ok($im->purge($mime), 'purged message');
+        $im->done;
+}
+
 done_testing();