Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-05 15:11:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-05 15:11:04 +0300
commit164ac94bbd2eadc02ab54322a6fe12ed48ae8041 (patch)
tree6eec29a4fd554eeb6f4a1b296e37bdf6fb5f6f80 /spec/workers/gitlab/github_import
parent8934df30a36d16ac9de9aebb079e16f16fda6912 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/gitlab/github_import')
-rw-r--r--spec/workers/gitlab/github_import/advance_stage_worker_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/workers/gitlab/github_import/advance_stage_worker_spec.rb b/spec/workers/gitlab/github_import/advance_stage_worker_spec.rb
index 121f30ea9d5..2faa28a365e 100644
--- a/spec/workers/gitlab/github_import/advance_stage_worker_spec.rb
+++ b/spec/workers/gitlab/github_import/advance_stage_worker_spec.rb
@@ -35,6 +35,17 @@ RSpec.describe Gitlab::GithubImport::AdvanceStageWorker, :clean_gitlab_redis_sha
worker.perform(project.id, { '123' => 2 }, :finish)
end
+
+ context 'when import state is nil' do
+ let(:import_state) { nil }
+
+ it 'clears the JobWaiter cache and does not perform any work' do
+ expect(Gitlab::JobWaiter).to receive(:delete_key).with('123')
+ expect(worker).not_to receive(:wait_for_jobs)
+
+ worker.perform(project.id, { '123' => 2 }, :finish)
+ end
+ end
end
context 'when there are no remaining jobs' do