summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 09:50:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 09:50:23 +0000
commit5d4c627a70247d545ac695665e9ce4d07887e116 (patch)
treeba9ce2baf16cf7092dcca102862955785ec706d5 /spec
parentc6bad18a5a8a66eaa641f5bf0177e3d7015c3cfa (diff)
downloadgitlab-ce-5d4c627a70247d545ac695665e9ce4d07887e116.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/workers/git_garbage_collect_worker_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/workers/git_garbage_collect_worker_spec.rb b/spec/workers/git_garbage_collect_worker_spec.rb
new file mode 100644
index 00000000000..3df64c35166
--- /dev/null
+++ b/spec/workers/git_garbage_collect_worker_spec.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+require 'fileutils'
+
+require 'spec_helper'
+
+RSpec.describe GitGarbageCollectWorker do
+ let_it_be(:project) { create(:project, :repository) }
+
+ let(:lease_uuid) { SecureRandom.uuid }
+ let(:lease_key) { "project_housekeeping:#{project.id}" }
+ let(:task) { :full_repack }
+ let(:params) { [project.id, task, lease_key, lease_uuid] }
+
+ subject { described_class.new }
+
+ describe "#perform" do
+ it 'calls the Projects::GitGarbageGitGarbageCollectWorker with the same params' do
+ expect_next_instance_of(Projects::GitGarbageCollectWorker) do |instance|
+ expect(instance).to receive(:perform).with(*params)
+ end
+
+ subject.perform(*params)
+ end
+ end
+end