diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-19 13:19:27 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-19 13:19:27 +0200 |
commit | a6d1e92d98e71098c5a32999294bcdce6c7a092d (patch) | |
tree | 15596cec369ed5844ba2c03a6c61e80728e3686d | |
parent | a468c3a3179d7c7b84a0f7d1e6253238e40b9100 (diff) | |
download | gitlab-ce-a6d1e92d98e71098c5a32999294bcdce6c7a092d.tar.gz |
Isolate stage_id reference clean up migration
This addreses a review remarks discussed in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12785/diffs#note_35276344
-rw-r--r-- | spec/migrations/clean_stage_id_reference_migration_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/migrations/clean_stage_id_reference_migration_spec.rb b/spec/migrations/clean_stage_id_reference_migration_spec.rb index 1b8d044ed61..c2072f2672d 100644 --- a/spec/migrations/clean_stage_id_reference_migration_spec.rb +++ b/spec/migrations/clean_stage_id_reference_migration_spec.rb @@ -1,17 +1,17 @@ require 'spec_helper' require Rails.root.join('db', 'migrate', '20170710083355_clean_stage_id_reference_migration.rb') -require Rails.root.join('db', 'post_migrate', '20170628080858_migrate_stage_id_reference_in_background') describe CleanStageIdReferenceMigration, :migration, :sidekiq, :redis do - let(:migration) { MigrateStageIdReferenceInBackground::MIGRATION } + let(:migration) { 'MigrateBuildStageIdReference' } context 'when there are pending background migrations' do it 'processes pending jobs synchronously' do Sidekiq::Testing.disable! do - BackgroundMigrationWorker.perform_in(2.minutes, migration, [1]) - BackgroundMigrationWorker.perform_async(migration, [1]) + BackgroundMigrationWorker.perform_in(2.minutes, migration, [1, 1]) + BackgroundMigrationWorker.perform_async(migration, [1, 1]) - expect(Gitlab::BackgroundMigration).to receive(:perform).twice + expect(Gitlab::BackgroundMigration) + .to receive(:perform).twice.and_call_original migrate! end |