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
Boxiang Sun
gitlab-ce
Commits
abf3a2d2
Commit
abf3a2d2
authored
Oct 26, 2018
by
Mark Lapierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add e2e test to push using a private token
Tests pushing over HTTP(S) using a personal access token
parent
48e61c6c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
qa/qa/factory/repository/push.rb
qa/qa/factory/repository/push.rb
+1
-1
qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
...er_ui/3_create/repository/push_http_private_token_spec.rb
+32
-0
No files found.
qa/qa/factory/repository/push.rb
View file @
abf3a2d2
...
...
@@ -45,7 +45,7 @@ module QA
repository
.
use_ssh_key
(
ssh_key
)
else
repository
.
uri
=
repository_http_uri
repository
.
use_default_credentials
repository
.
use_default_credentials
unless
user
end
username
=
'GitLab QA'
...
...
qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
0 → 100644
View file @
abf3a2d2
# frozen_string_literal: true
module
QA
context
'Create'
do
describe
'Git push over HTTP'
,
:ldap_no_tls
do
it
'user using a personal access token pushes code to the repository'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
access_token
=
Factory
::
Resource
::
PersonalAccessToken
.
fabricate!
.
access_token
user
=
Factory
::
Resource
::
User
.
new
.
tap
do
|
user
|
user
.
username
=
Runtime
::
User
.
username
user
.
password
=
access_token
end
push
=
Factory
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
user
=
user
push
.
file_name
=
'README.md'
push
.
file_content
=
'# This is a test project'
push
.
commit_message
=
'Add README.md'
end
push
.
project
.
visit!
Page
::
Project
::
Show
.
perform
(
&
:wait_for_push
)
expect
(
page
).
to
have_content
(
'README.md'
)
expect
(
page
).
to
have_content
(
'This is a test project'
)
end
end
end
end
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