Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
4ef5d1fd
Commit
4ef5d1fd
authored
Nov 19, 2018
by
Sanad Liaquat
Committed by
Mark Lapierre
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE port of "qa-staging-15-use-existing-users-ee"
parent
9cbc82ef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
qa/qa/resource/user.rb
qa/qa/resource/user.rb
+11
-0
qa/qa/runtime/env.rb
qa/qa/runtime/env.rb
+16
-0
qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
...es/browser_ui/1_manage/project/add_project_member_spec.rb
+1
-1
No files found.
qa/qa/resource/user.rb
View file @
4ef5d1fd
...
@@ -76,6 +76,17 @@ module QA
...
@@ -76,6 +76,17 @@ module QA
}
}
end
end
def
self
.
fabricate_or_use
(
username
,
password
)
if
Runtime
::
Env
.
signup_disabled?
self
.
new
.
tap
do
|
user
|
user
.
username
=
username
user
.
password
=
password
end
else
self
.
fabricate!
end
end
private
private
def
fetch_id
(
username
)
def
fetch_id
(
username
)
...
...
qa/qa/runtime/env.rb
View file @
4ef5d1fd
...
@@ -75,6 +75,22 @@ module QA
...
@@ -75,6 +75,22 @@ module QA
ENV
[
'GITLAB_FORKER_PASSWORD'
]
ENV
[
'GITLAB_FORKER_PASSWORD'
]
end
end
def
gitlab_qa_username_1
ENV
[
'GITLAB_QA_USERNAME_1'
]
||
'gitlab-qa-user1'
end
def
gitlab_qa_password_1
ENV
[
'GITLAB_QA_PASSWORD_1'
]
end
def
gitlab_qa_username_2
ENV
[
'GITLAB_QA_USERNAME_2'
]
||
'gitlab-qa-user2'
end
def
gitlab_qa_password_2
ENV
[
'GITLAB_QA_PASSWORD_2'
]
end
def
ldap_username
def
ldap_username
ENV
[
'GITLAB_LDAP_USERNAME'
]
ENV
[
'GITLAB_LDAP_USERNAME'
]
end
end
...
...
qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
View file @
4ef5d1fd
...
@@ -7,7 +7,7 @@ module QA
...
@@ -7,7 +7,7 @@ module QA
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
user
=
Resource
::
User
.
fabricate
!
user
=
Resource
::
User
.
fabricate
_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
project
=
Resource
::
Project
.
fabricate!
do
|
resource
|
project
=
Resource
::
Project
.
fabricate!
do
|
resource
|
resource
.
name
=
'add-member-project'
resource
.
name
=
'add-member-project'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment