diff options
| author | Drew Blessing <drew@gitlab.com> | 2015-12-22 15:09:35 -0600 |
|---|---|---|
| committer | Drew Blessing <drew@gitlab.com> | 2016-12-16 09:57:05 -0600 |
| commit | e0eb86ee809aaad86be4ca1d985a5e67c0657a6f (patch) | |
| tree | e24cc5d86b0fcfc591bff3cdb764b2eaf49aa0ae /spec/tasks | |
| parent | bdb5e6771856c280fa1cf92b19a47fb83a4988ec (diff) | |
| download | gitlab-ce-e0eb86ee809aaad86be4ca1d985a5e67c0657a6f.tar.gz | |
Add LDAP task to rename a provider
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.
Diffstat (limited to 'spec/tasks')
| -rw-r--r-- | spec/tasks/gitlab/ldap_rake_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/ldap_rake_spec.rb b/spec/tasks/gitlab/ldap_rake_spec.rb new file mode 100644 index 00000000000..12d442b9820 --- /dev/null +++ b/spec/tasks/gitlab/ldap_rake_spec.rb @@ -0,0 +1,13 @@ +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 |
