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-12 18:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-12 18:09:17 +0300
commit901ecdbf5cccc7f40a4e959835389af19ddd87ee (patch)
treee882146114a6cc2c009d4e1c4229aaeccc226cc4 /spec/workers/bulk_imports
parenta99c04f0185d6a6b398c37630c392ca84494c0a5 (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.rb22
-rw-r--r--spec/workers/bulk_imports/export_request_worker_spec.rb6
-rw-r--r--spec/workers/bulk_imports/pipeline_worker_spec.rb26
3 files changed, 37 insertions, 17 deletions
diff --git a/spec/workers/bulk_imports/entity_worker_spec.rb b/spec/workers/bulk_imports/entity_worker_spec.rb
index c4a95166007..0fcdbccc304 100644
--- a/spec/workers/bulk_imports/entity_worker_spec.rb
+++ b/spec/workers/bulk_imports/entity_worker_spec.rb
@@ -40,7 +40,8 @@ RSpec.describe BulkImports::EntityWorker do
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
'current_stage' => nil,
- 'message' => 'Stage starting'
+ 'message' => 'Stage starting',
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -70,7 +71,8 @@ RSpec.describe BulkImports::EntityWorker do
hash_including(
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
- 'current_stage' => nil
+ 'current_stage' => nil,
+ 'importer' => 'gitlab_migration'
)
)
@@ -81,14 +83,20 @@ RSpec.describe BulkImports::EntityWorker do
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
'current_stage' => nil,
- 'message' => 'Error!'
+ 'message' => 'Error!',
+ 'importer' => 'gitlab_migration'
)
)
end
expect(Gitlab::ErrorTracking)
.to receive(:track_exception)
- .with(exception, bulk_import_entity_id: entity.id, bulk_import_id: entity.bulk_import_id)
+ .with(
+ exception,
+ bulk_import_entity_id: entity.id,
+ bulk_import_id: entity.bulk_import_id,
+ importer: 'gitlab_migration'
+ )
subject
end
@@ -105,7 +113,8 @@ RSpec.describe BulkImports::EntityWorker do
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
'current_stage' => 0,
- 'message' => 'Stage running'
+ 'message' => 'Stage running',
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -133,7 +142,8 @@ RSpec.describe BulkImports::EntityWorker do
hash_including(
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
- 'current_stage' => 0
+ 'current_stage' => 0,
+ 'importer' => 'gitlab_migration'
)
)
end
diff --git a/spec/workers/bulk_imports/export_request_worker_spec.rb b/spec/workers/bulk_imports/export_request_worker_spec.rb
index 8d78c2ca35c..bd9fce7935c 100644
--- a/spec/workers/bulk_imports/export_request_worker_spec.rb
+++ b/spec/workers/bulk_imports/export_request_worker_spec.rb
@@ -45,7 +45,8 @@ RSpec.describe BulkImports::ExportRequestWorker do
'exception_message' => 'Export error',
'correlation_id_value' => anything,
'bulk_import_id' => bulk_import.id,
- 'bulk_import_entity_type' => entity.source_type
+ 'bulk_import_entity_type' => entity.source_type,
+ 'importer' => 'gitlab_migration'
)
).twice
@@ -104,7 +105,8 @@ RSpec.describe BulkImports::ExportRequestWorker do
'exception_message' => "undefined method `model_id' for nil:NilClass",
'correlation_id_value' => anything,
'bulk_import_id' => bulk_import.id,
- 'bulk_import_entity_type' => entity.source_type
+ 'bulk_import_entity_type' => entity.source_type,
+ 'importer' => 'gitlab_migration'
)
).twice
diff --git a/spec/workers/bulk_imports/pipeline_worker_spec.rb b/spec/workers/bulk_imports/pipeline_worker_spec.rb
index bbc0e2e11af..ee65775f170 100644
--- a/spec/workers/bulk_imports/pipeline_worker_spec.rb
+++ b/spec/workers/bulk_imports/pipeline_worker_spec.rb
@@ -38,7 +38,8 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
- 'bulk_import_id' => entity.bulk_import_id
+ 'bulk_import_id' => entity.bulk_import_id,
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -86,7 +87,8 @@ RSpec.describe BulkImports::PipelineWorker do
'pipeline_tracker_id' => pipeline_tracker.id,
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
- 'message' => 'Unstarted pipeline not found'
+ 'message' => 'Unstarted pipeline not found',
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -124,7 +126,8 @@ RSpec.describe BulkImports::PipelineWorker do
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
- 'message' => 'Error!'
+ 'message' => 'Error!',
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -134,8 +137,9 @@ 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
+ bulk_import_id: entity.bulk_import_id,
+ pipeline_name: pipeline_tracker.pipeline_name,
+ importer: 'gitlab_migration'
)
expect(BulkImports::EntityWorker)
@@ -184,7 +188,8 @@ RSpec.describe BulkImports::PipelineWorker do
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
'bulk_import_id' => entity.bulk_import_id,
- 'message' => 'Skipping pipeline due to failed entity'
+ 'message' => 'Skipping pipeline due to failed entity',
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -231,7 +236,8 @@ RSpec.describe BulkImports::PipelineWorker do
hash_including(
'pipeline_name' => 'FakePipeline',
'bulk_import_entity_id' => entity.id,
- 'bulk_import_id' => entity.bulk_import_id
+ 'bulk_import_id' => entity.bulk_import_id,
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -356,7 +362,8 @@ RSpec.describe BulkImports::PipelineWorker do
'pipeline_name' => 'NdjsonPipeline',
'bulk_import_entity_id' => entity.id,
'message' => 'Pipeline timeout',
- 'bulk_import_id' => entity.bulk_import_id
+ 'bulk_import_id' => entity.bulk_import_id,
+ 'importer' => 'gitlab_migration'
)
)
end
@@ -384,7 +391,8 @@ RSpec.describe BulkImports::PipelineWorker do
'pipeline_name' => 'NdjsonPipeline',
'bulk_import_entity_id' => entity.id,
'message' => 'Export from source instance failed: Error!',
- 'bulk_import_id' => entity.bulk_import_id
+ 'bulk_import_id' => entity.bulk_import_id,
+ 'importer' => 'gitlab_migration'
)
)
end