diff options
author | Stan Hu <stanhu@gmail.com> | 2018-03-03 22:18:32 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-03-03 22:21:50 -0800 |
commit | 885998c220d76cf373669666dab5a2bb8dfbe023 (patch) | |
tree | 55da69c294c6de53ea6ceab97c10d3ec4a4e73c8 /spec/workers | |
parent | 8a0052c037f025b64159ca8cfe0d3451261c1edb (diff) | |
download | gitlab-ce-885998c220d76cf373669666dab5a2bb8dfbe023.tar.gz |
Release libgit2 cache and open file descriptors after `git gc` runsh-cleanup-after-git-gc
Relates to #21879
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/git_garbage_collect_worker_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/workers/git_garbage_collect_worker_spec.rb b/spec/workers/git_garbage_collect_worker_spec.rb index 47297de738b..74539a7e493 100644 --- a/spec/workers/git_garbage_collect_worker_spec.rb +++ b/spec/workers/git_garbage_collect_worker_spec.rb @@ -195,6 +195,12 @@ describe GitGarbageCollectWorker do expect(File.exist?(bitmap_path(after_packs.first))).to eq(bitmaps_enabled) end + + it 'cleans up repository after finishing' do + expect_any_instance_of(Project).to receive(:cleanup).and_call_original + + subject.perform(project.id, 'gc', lease_key, lease_uuid) + end end context 'with bitmaps enabled' do |