Add LDAP_USERNAME and LDAP_PASSWORD user environment variables for QA
This commit is contained in:
parent
dd633bc188
commit
07b6ad351a
3 changed files with 18 additions and 2 deletions
|
@ -53,8 +53,8 @@ module QA
|
||||||
|
|
||||||
click_link 'LDAP'
|
click_link 'LDAP'
|
||||||
|
|
||||||
fill_in :username, with: Runtime::User.name
|
fill_in :username, with: Runtime::User.ldap_username
|
||||||
fill_in :password, with: Runtime::User.password
|
fill_in :password, with: Runtime::User.ldap_password
|
||||||
click_button 'Sign in'
|
click_button 'Sign in'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -35,6 +35,14 @@ module QA
|
||||||
ENV['GITLAB_PASSWORD']
|
ENV['GITLAB_PASSWORD']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ldap_username
|
||||||
|
ENV['GITLAB_LDAP_USERNAME']
|
||||||
|
end
|
||||||
|
|
||||||
|
def ldap_password
|
||||||
|
ENV['GITLAB_LDAP_PASSWORD']
|
||||||
|
end
|
||||||
|
|
||||||
def sandbox_name
|
def sandbox_name
|
||||||
ENV['GITLAB_SANDBOX_NAME']
|
ENV['GITLAB_SANDBOX_NAME']
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,14 @@ module QA
|
||||||
def ldap_user?
|
def ldap_user?
|
||||||
Runtime::Env.user_type == 'ldap'
|
Runtime::Env.user_type == 'ldap'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ldap_username
|
||||||
|
Runtime::Env.ldap_username || name
|
||||||
|
end
|
||||||
|
|
||||||
|
def ldap_password
|
||||||
|
Runtime::Env.ldap_password || password
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue