Commit 56e7548b authored by Michael Kozono's avatar Michael Kozono

Fix Rubocop offenses

parent 405a75c4
......@@ -9,6 +9,8 @@ module Gitlab
end
end
delegate :remove_keys_not_found_in_db, to: :gitlab_shell
def perform(cutoff_datetime)
add_keys_since(cutoff_datetime)
......@@ -22,10 +24,6 @@ module Gitlab
end
end
def 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
def batch_add_keys_in_db_starting_from(start_id)
gitlab_shell.batch_add_keys do |adder|
......
......@@ -89,8 +89,8 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
file = File.read(Rails.root.join('tmp/tests/.ssh/authorized_keys'))
expect(file.scan(/ssh-rsa/).count).to eq(7)
expect(file).to_not include(Gitlab::Shell.strip_key(@keys[0].key))
expect(file).to_not include(Gitlab::Shell.strip_key(@keys[2].key))
expect(file).not_to include(Gitlab::Shell.strip_key(@keys[0].key))
expect(file).not_to include(Gitlab::Shell.strip_key(@keys[2].key))
expect(file).to include(Gitlab::Shell.strip_key(@keys[3].key))
expect(file).to include(Gitlab::Shell.strip_key(@keys[9].key))
end
......
......@@ -331,7 +331,7 @@ describe Gitlab::Shell, lib: true do
end
end
expect(ids).to eq(["1\n", "2\n", "3\n", "4\n"])
expect(ids).to eq(%W{1\n 2\n 3\n 4\n})
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