diff options
author | Eric Wong <e@80x24.org> | 2019-01-31 00:32:42 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-31 00:32:42 +0000 |
commit | 2d4403cf9972f8ae78aa52fe6ce7a01d9b6757c1 (patch) | |
tree | 4bc738af91593e725f5f5088cc3f8c3a446fd695 /t/git.t | |
parent | 3041de7ee07ca13d3d8465aa68f076269e19fc3b (diff) | |
download | public-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/git.t')
-rw-r--r-- | t/git.t | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |