Set user type to LDAP when running the LDAP scenartio
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21354 selected a few more tests to run as part of the Test::Integration::LDAP
scenario because of https://gitlab.com/gitlab-org/gitlab-ce/issues/50579
That requires that GITLAB_USER_TYPE
is set to 'ldap'. As @stanhu noted:
A quick patch to actually make this spec use LDAP:
diff --git a/lib/gitlab/qa/component/ldap.rb b/lib/gitlab/qa/component/ldap.rb
index 942cfef..17ba094 100644
--- a/lib/gitlab/qa/component/ldap.rb
+++ b/lib/gitlab/qa/component/ldap.rb
@@ -150,6 +150,7 @@ module Gitlab
end
def set_gitlab_credentials
+ ::Gitlab::QA::Runtime::Env.user_type = 'ldap'
::Gitlab::QA::Runtime::Env.ldap_username = username
::Gitlab::QA::Runtime::Env.ldap_password = password
end
But Stan also noted that setting the user type to ldap might break EE if the ldap user isn't an admin and therefore can't apply an EE license. So we'll need to make sure is still works when EE_LICENSE
is set.