about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-31 00:32:42 +0000
committerEric Wong <e@80x24.org>2019-01-31 00:32:42 +0000
commit2d4403cf9972f8ae78aa52fe6ce7a01d9b6757c1 (patch)
tree4bc738af91593e725f5f5088cc3f8c3a446fd695 /t
parent3041de7ee07ca13d3d8465aa68f076269e19fc3b (diff)
downloadpublic-inbox-2d4403cf9972f8ae78aa52fe6ce7a01d9b6757c1.tar.gz
Otherwise, long-running but idle git processes may keep unlinked
packs around indefinitely and waste disk space.
Diffstat (limited to 't')
-rw-r--r--t/git.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/git.t b/t/git.t
index 9c80fbb4..d637e63b 100644
--- a/t/git.t
+++ b/t/git.t
@@ -142,6 +142,10 @@ if ('alternates reloaded') {
         open $fh, '<', "$alt/config" or die "open failed: $!\n";
         my $config = eval { local $/; <$fh> };
         is($$found, $config, 'alternates reloaded');
+
+        ok($gcf->cleanup(time - 30), 'cleanup did not expire');
+        ok(!$gcf->cleanup(time + 30), 'cleanup can expire');
+        ok(!$gcf->cleanup, 'cleanup idempotent');
 }
 
 use_ok 'PublicInbox::Git', qw(git_unquote git_quote);