summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-09-11 07:45:12 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-09-11 07:45:12 +0000
commit17ca203290c52ff366b0ecc4de3f4da8eebd4380 (patch)
tree555d780bb7de40edbf4ff06555a8563f3ac6fd0d
parentcb15138891f7412d75af49526f78c0ef2394968d (diff)
parent69eddc14b11b63429b8f2511a1127616c692b94c (diff)
downloadgitlab-ce-17ca203290c52ff366b0ecc4de3f4da8eebd4380.tar.gz
Merge branch 'sh-test-ldap-clones-via-gitlab-qa' into 'master'
QA: Add support for testing Git over HTTP with LDAP users See merge request gitlab-org/gitlab-ce!21354
-rw-r--r--qa/qa/git/repository.rb9
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb2
4 files changed, 10 insertions, 5 deletions
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb
index bdbb18b5045..faecacd45ec 100644
--- a/qa/qa/git/repository.rb
+++ b/qa/qa/git/repository.rb
@@ -28,8 +28,13 @@ module QA
end
def use_default_credentials
- self.username = Runtime::User.username
- self.password = Runtime::User.password
+ if ::QA::Runtime::User.ldap_user?
+ self.username = Runtime::User.ldap_username
+ self.password = Runtime::User.ldap_password
+ else
+ self.username = Runtime::User.username
+ self.password = Runtime::User.password
+ end
end
def clone(opts = '')
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
index b19bdd950fa..0dcdc6639d1 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb
@@ -2,7 +2,7 @@
module QA
context :create do
- describe 'Git clone over HTTP' do
+ describe 'Git clone over HTTP', :ldap do
let(:location) do
Page::Project::Show.act do
choose_repository_clone_http
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
index 40dfd138a1b..bf32569b6cb 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
@@ -2,7 +2,7 @@
module QA
context :create do
- describe 'Git push over HTTP' do
+ describe 'Git push over HTTP', :ldap do
it 'user pushes code to the repository' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
index 1d9cc33080d..b2da685c477 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb
@@ -2,7 +2,7 @@
module QA
context :create do
- describe 'Protected branch support' do
+ describe 'Protected branch support', :ldap do
let(:branch_name) { 'protected-branch' }
let(:commit_message) { 'Protected push commit message' }
let(:project) do