diff options
Diffstat (limited to 'spec/support/shared_examples/workers/gitlab/github_import/stage_methods_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/workers/gitlab/github_import/stage_methods_shared_examples.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/support/shared_examples/workers/gitlab/github_import/stage_methods_shared_examples.rb b/spec/support/shared_examples/workers/gitlab/github_import/stage_methods_shared_examples.rb new file mode 100644 index 00000000000..af5bf33a9a6 --- /dev/null +++ b/spec/support/shared_examples/workers/gitlab/github_import/stage_methods_shared_examples.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +RSpec.shared_examples Gitlab::GithubImport::StageMethods do + describe '.sidekiq_retries_exhausted' do + it 'tracks the exception and marks the import as failed' do + expect(Gitlab::Import::ImportFailureService).to receive(:track) + .with( + project_id: 1, + exception: StandardError, + fail_import: true, + error_source: anything + ) + + described_class.sidekiq_retries_exhausted_block.call({ 'args' => [1] }, StandardError.new) + end + end +end |