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:
authorGabriel Mazetto <brodock@gmail.com>2018-12-22 16:54:33 +0300
committerGabriel Mazetto <brodock@gmail.com>2019-01-25 22:26:35 +0300
commitc2c34eba62f26bed8cad8b07934e14b4519eef7c (patch)
treeb5ab373fc66274e4a902ff828f1ba460300d30fa /spec/lib/gitlab/hashed_storage
parent07a196be3dca5125454262bb96967d5895081c56 (diff)
Prepare rake task for storage rollback
We are keeping compatibility with existing scheduled jobs.
Diffstat (limited to 'spec/lib/gitlab/hashed_storage')
-rw-r--r--spec/lib/gitlab/hashed_storage/migrator_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/hashed_storage/migrator_spec.rb b/spec/lib/gitlab/hashed_storage/migrator_spec.rb
index 01d43ed00a2..6d68cb0744b 100644
--- a/spec/lib/gitlab/hashed_storage/migrator_spec.rb
+++ b/spec/lib/gitlab/hashed_storage/migrator_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::HashedStorage::Migrator do
describe '#bulk_schedule' do
it 'schedules job to StorageMigratorWorker' do
Sidekiq::Testing.fake! do
- expect { subject.bulk_schedule(1, 5) }.to change(StorageMigratorWorker.jobs, :size).by(1)
+ expect { subject.bulk_schedule(start: 1, finish: 5) }.to change(StorageMigratorWorker.jobs, :size).by(1)
end
end
end
@@ -15,13 +15,13 @@ describe Gitlab::HashedStorage::Migrator do
it 'enqueue jobs to ProjectMigrateHashedStorageWorker' do
Sidekiq::Testing.fake! do
- expect { subject.bulk_migrate(ids.min, ids.max) }.to change(ProjectMigrateHashedStorageWorker.jobs, :size).by(2)
+ expect { subject.bulk_migrate(start: ids.min, finish: ids.max) }.to change(ProjectMigrateHashedStorageWorker.jobs, :size).by(2)
end
end
it 'rescues and log exceptions' do
allow_any_instance_of(Project).to receive(:migrate_to_hashed_storage!).and_raise(StandardError)
- expect { subject.bulk_migrate(ids.min, ids.max) }.not_to raise_error
+ expect { subject.bulk_migrate(start: ids.min, finish: ids.max) }.not_to raise_error
end
it 'delegates each project in specified range to #migrate' do
@@ -29,12 +29,12 @@ describe Gitlab::HashedStorage::Migrator do
expect(subject).to receive(:migrate).with(project)
end
- subject.bulk_migrate(ids.min, ids.max)
+ subject.bulk_migrate(start: ids.min, finish: ids.max)
end
it 'has migrated projects set as writable' do
perform_enqueued_jobs do
- subject.bulk_migrate(ids.min, ids.max)
+ subject.bulk_migrate(start: ids.min, finish: ids.max)
end
projects.each do |project|