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:
Diffstat (limited to 'spec/services/bulk_imports/batched_relation_export_service_spec.rb')
-rw-r--r--spec/services/bulk_imports/batched_relation_export_service_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/bulk_imports/batched_relation_export_service_spec.rb b/spec/services/bulk_imports/batched_relation_export_service_spec.rb
index dd85961befd..cb356b90c61 100644
--- a/spec/services/bulk_imports/batched_relation_export_service_spec.rb
+++ b/spec/services/bulk_imports/batched_relation_export_service_spec.rb
@@ -57,6 +57,16 @@ RSpec.describe BulkImports::BatchedRelationExportService, feature_category: :imp
expect(export.batches.count).to eq(11)
end
end
+
+ context 'when an error occurs during batches creation' do
+ it 'does not enqueue FinishBatchedRelationExportWorker' do
+ allow(service).to receive(:enqueue_batch_exports).and_raise(StandardError)
+
+ expect(BulkImports::FinishBatchedRelationExportWorker).not_to receive(:perform_async)
+
+ expect { service.execute }.to raise_error(StandardError)
+ end
+ end
end
context 'when there are no batches to export' do