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>2022-10-11 18:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-11 18:10:03 +0300
commit14ae125e1c59ca3e9b535938707831c986dbbc43 (patch)
tree6cb2244b7aafe63586d5e1c538ab8e1385db4163 /spec/workers/bulk_imports
parentfd31bd1fc7954f69025d8e6bbe7f772ea9fb4bb0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/bulk_imports')
-rw-r--r--spec/workers/bulk_imports/entity_worker_spec.rb7
-rw-r--r--spec/workers/bulk_imports/pipeline_worker_spec.rb16
2 files changed, 18 insertions, 5 deletions
diff --git a/spec/workers/bulk_imports/entity_worker_spec.rb b/spec/workers/bulk_imports/entity_worker_spec.rb
index ba638e1369e..c4a95166007 100644
--- a/spec/workers/bulk_imports/entity_worker_spec.rb
+++ b/spec/workers/bulk_imports/entity_worker_spec.rb
@@ -38,6 +38,7 @@ RSpec.describe BulkImports::EntityWorker do
.with(
hash_including(
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'current_stage' => nil,
'message' => 'Stage starting'
)
@@ -68,6 +69,7 @@ RSpec.describe BulkImports::EntityWorker do
.with(
hash_including(
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'current_stage' => nil
)
)
@@ -77,6 +79,7 @@ RSpec.describe BulkImports::EntityWorker do
.with(
hash_including(
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'current_stage' => nil,
'message' => 'Error!'
)
@@ -85,7 +88,7 @@ RSpec.describe BulkImports::EntityWorker do
expect(Gitlab::ErrorTracking)
.to receive(:track_exception)
- .with(exception, bulk_import_entity_id: entity.id)
+ .with(exception, bulk_import_entity_id: entity.id, bulk_import_id: entity.bulk_import_id)
subject
end
@@ -100,6 +103,7 @@ RSpec.describe BulkImports::EntityWorker do
.with(
hash_including(
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'current_stage' => 0,
'message' => 'Stage running'
)
@@ -128,6 +132,7 @@ RSpec.describe BulkImports::EntityWorker do
.with(
hash_including(
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'current_stage' => 0
)
)
diff --git a/spec/workers/bulk_imports/pipeline_worker_spec.rb b/spec/workers/bulk_imports/pipeline_worker_spec.rb
index ef1db948893..bbc0e2e11af 100644
--- a/spec/workers/bulk_imports/pipeline_worker_spec.rb
+++ b/spec/workers/bulk_imports/pipeline_worker_spec.rb
@@ -37,7 +37,8 @@ RSpec.describe BulkImports::PipelineWorker do
.with(
hash_including(
'pipeline_name' => 'FakePipeline',
- 'bulk_import_entity_id' => entity.id
+ 'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id
)
)
end
@@ -84,6 +85,7 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_tracker_id' => pipeline_tracker.id,
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'message' => 'Unstarted pipeline not found'
)
)
@@ -121,6 +123,7 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'message' => 'Error!'
)
)
@@ -131,6 +134,7 @@ RSpec.describe BulkImports::PipelineWorker do
.with(
instance_of(StandardError),
bulk_import_entity_id: entity.id,
+ bulk_import_id: entity.bulk_import.id,
pipeline_name: pipeline_tracker.pipeline_name
)
@@ -179,6 +183,7 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id,
'message' => 'Skipping pipeline due to failed entity'
)
)
@@ -225,7 +230,8 @@ RSpec.describe BulkImports::PipelineWorker do
.with(
hash_including(
'pipeline_name' => 'FakePipeline',
- 'bulk_import_entity_id' => entity.id
+ 'bulk_import_entity_id' => entity.id,
+ 'bulk_import_id' => entity.bulk_import_id
)
)
end
@@ -349,7 +355,8 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'NdjsonPipeline',
'bulk_import_entity_id' => entity.id,
- 'message' => 'Pipeline timeout'
+ 'message' => 'Pipeline timeout',
+ 'bulk_import_id' => entity.bulk_import_id
)
)
end
@@ -376,7 +383,8 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'NdjsonPipeline',
'bulk_import_entity_id' => entity.id,
- 'message' => 'Export from source instance failed: Error!'
+ 'message' => 'Export from source instance failed: Error!',
+ 'bulk_import_id' => entity.bulk_import_id
)
)
end