Commit 405a75c4 authored by Michael Kozono's avatar Michael Kozono

Do read and delete work in background migration

parent 8d6e72f3
......@@ -23,7 +23,7 @@ module Gitlab
end
def remove_keys_not_found_in_db
GitlabShellWorker.perform_async(:remove_keys_not_found_in_db)
gitlab_shell.remove_keys_not_found_in_db
end
# Not added to Gitlab::Shell because I don't expect this to be used again
......
......@@ -27,8 +27,8 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
end
end
it 'queues a remove_keys_not_found_in_db call to GitlabShellWorker' do
expect(GitlabShellWorker).to receive(:perform_async).with(:remove_keys_not_found_in_db)
it 'calls remove_keys_not_found_in_db on Gitlab::Shell' do
expect(background_migration.gitlab_shell).to receive(:remove_keys_not_found_in_db)
subject
end
end
......@@ -66,8 +66,8 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
end
describe '#remove_keys_not_found_in_db' do
it 'queues a rm_keys_not_in_db call to GitlabShellWorker' do
expect(GitlabShellWorker).to receive(:perform_async).with(:remove_keys_not_found_in_db)
it 'calls remove_keys_not_found_in_db on Gitlab::Shell' do
expect(background_migration.gitlab_shell).to receive(:remove_keys_not_found_in_db)
background_migration.remove_keys_not_found_in_db
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment