e0eb86ee80
Sometimes admins will change the LDAP configuration, not realizing that problems will occur if the user's LDAP identities are not also updated to use the new provider name. This task will give admins a single command to run to update identities and will prevent having to run multiple Rails console queries.
13 lines
374 B
Ruby
13 lines
374 B
Ruby
require 'rake_helper'
|
|
|
|
describe 'gitlab:ldap:rename_provider rake task' do
|
|
it 'completes without error' do
|
|
Rake.application.rake_require 'tasks/gitlab/ldap'
|
|
stub_warn_user_is_not_gitlab
|
|
ENV['force'] = 'yes'
|
|
|
|
create(:identity) # Necessary to prevent `exit 1` from the task.
|
|
|
|
run_rake_task('gitlab:ldap:rename_provider', 'ldapmain', 'ldapfoo')
|
|
end
|
|
end
|