diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-08 21:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-08 21:08:27 +0300 |
commit | 99c01aa6867b91b8d2279eb8d32794ea90d5dcdc (patch) | |
tree | ae36b06dd962230381080d9e2a31385cea5f8609 /spec/workers | |
parent | 5693fb6ba7d21ba7b79775543a3f195eb989664b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb b/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb new file mode 100644 index 00000000000..5afc5717b82 --- /dev/null +++ b/spec/workers/gitlab/import/stuck_project_import_jobs_worker_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::Import::StuckProjectImportJobsWorker do + let(:worker) { described_class.new } + + describe 'with scheduled import_status' do + it_behaves_like 'stuck import job detection' do + let(:import_state) { create(:project, :import_scheduled).import_state } + + before do + import_state.update(jid: '123') + end + end + end + + describe 'with started import_status' do + it_behaves_like 'stuck import job detection' do + let(:import_state) { create(:project, :import_started).import_state } + + before do + import_state.update(jid: '123') + end + end + end +end |