diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:21 +0300 |
commit | e0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (patch) | |
tree | 9abb3c0706576bbda895fe9539a55556930606e2 /spec/support/shared_examples/lib | |
parent | f8d15ca65390475e356b06dedc51e10ccd179f86 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/lib')
-rw-r--r-- | spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb index 60c0ec45c71..8f5bfdacc3a 100644 --- a/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/background_migration/mentions_migration_shared_examples.rb @@ -65,9 +65,16 @@ shared_examples 'resource notes mentions migration' do |migration_class, resourc end shared_examples 'schedules resource mentions migration' do |resource_class, is_for_notes| + before do + stub_const("#{described_class.name}::BATCH_SIZE", 1) + end + it 'schedules background migrations' do Sidekiq::Testing.fake! do Timecop.freeze do + resource_count = is_for_notes ? Note.count : resource_class.count + expect(resource_count).to eq 5 + migrate! migration = described_class::MIGRATION |