From 523712d116a560f314cf144edbde076d7ab6fdc4 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Wed, 13 Mar 2019 15:54:30 +0100 Subject: Fix storage migration check for non-empty queues The previous code works fine when running specs, but the API does not exist outside that environment. --- spec/tasks/gitlab/storage_rake_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/tasks') diff --git a/spec/tasks/gitlab/storage_rake_spec.rb b/spec/tasks/gitlab/storage_rake_spec.rb index 736809eee5b..4b04d9cec39 100644 --- a/spec/tasks/gitlab/storage_rake_spec.rb +++ b/spec/tasks/gitlab/storage_rake_spec.rb @@ -89,9 +89,9 @@ describe 'rake gitlab:storage:*', :sidekiq do describe 'gitlab:storage:migrate_to_hashed' do let(:task) { 'gitlab:storage:migrate_to_hashed' } - context 'with rollback already scheduled' do + context 'with rollback already scheduled', :redis do it 'does nothing' do - Sidekiq::Testing.fake! do + Sidekiq::Testing.disable! do ::HashedStorage::RollbackerWorker.perform_async(1, 5) expect(Project).not_to receive(:with_unmigrated_storage) @@ -146,9 +146,9 @@ describe 'rake gitlab:storage:*', :sidekiq do it_behaves_like 'make sure database is writable' - context 'with migration already scheduled' do + context 'with migration already scheduled', :redis do it 'does nothing' do - Sidekiq::Testing.fake! do + Sidekiq::Testing.disable! do ::HashedStorage::MigratorWorker.perform_async(1, 5) expect(Project).not_to receive(:with_unmigrated_storage) -- cgit v1.2.1