Commit 1cb1fc31 authored by Sean McGivern's avatar Sean McGivern

Merge branch '356874_fix_completion_for_token_encryption' into 'master'

Mark token encryption job as completed when there are no users

See merge request gitlab-org/gitlab!83850
parents 52e8a698 f72f97e1
......@@ -52,10 +52,10 @@ module Gitlab
WHERE cte_id = id
SQL
end
end
mark_job_as_succeeded(start_id, end_id)
end
end
private
......
......@@ -39,6 +39,14 @@ RSpec.describe Gitlab::BackgroundMigration::EncryptStaticObjectToken do
expect(new_state[user_with_encrypted_token.id]).to match_array([nil, 'encrypted'])
end
context 'when id range does not include existing user ids' do
let(:arguments) { [non_existing_record_id, non_existing_record_id.succ] }
it_behaves_like 'marks background migration job records' do
subject { described_class.new }
end
end
private
def create_user!(name:, token: nil, encrypted_token: nil)
......
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