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>2020-02-19 21:09:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-19 21:09:10 +0300
commit33795139ea8e72756bee3675b4e16387425e6ab1 (patch)
tree3ca568fca61482e57810ee30ad5ce4b964a82c4e /spec/workers/background_migration_worker_spec.rb
parentc7e385e282bcb8505589bce526e692b7bb819ffa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/background_migration_worker_spec.rb')
-rw-r--r--spec/workers/background_migration_worker_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/workers/background_migration_worker_spec.rb b/spec/workers/background_migration_worker_spec.rb
index aae6fa02a0c..2b2ffc9f5b9 100644
--- a/spec/workers/background_migration_worker_spec.rb
+++ b/spec/workers/background_migration_worker_spec.rb
@@ -11,7 +11,7 @@ describe BackgroundMigrationWorker, :clean_gitlab_redis_shared_state do
end
end
- describe '.perform' do
+ describe '#perform' do
it 'performs a background migration' do
expect(Gitlab::BackgroundMigration)
.to receive(:perform)
@@ -52,6 +52,14 @@ describe BackgroundMigrationWorker, :clean_gitlab_redis_shared_state do
worker.perform('Foo', [10, 20])
end
+
+ it 'sets the class that will be executed as the caller_id' do
+ expect(Gitlab::BackgroundMigration).to receive(:perform) do
+ expect(Labkit::Context.current.to_h).to include('meta.caller_id' => 'Foo')
+ end
+
+ worker.perform('Foo', [10, 20])
+ end
end
describe '#healthy_database?' do