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
5013f3a8
Commit
5013f3a8
authored
Jun 26, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use updated gitlab-test repo for signed commits
parent
afd7582a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+5
-19
spec/support/test_env.rb
spec/support/test_env.rb
+1
-0
No files found.
spec/features/commits_spec.rb
View file @
5013f3a8
require
'spec_helper'
require
'fileutils'
describe
'Commits'
do
include
CiStatusHelper
...
...
@@ -206,19 +205,6 @@ describe 'Commits' do
end
describe
'GPG signed commits'
do
before
do
# FIXME: add this to the test repository directly
remote_path
=
project
.
repository
.
path_to_repo
Dir
.
mktmpdir
do
|
dir
|
FileUtils
.
cd
dir
do
`git clone --quiet
#{
remote_path
}
.`
`git commit --quiet -S
#{
GpgHelpers
::
User1
.
primary_keyid
}
--allow-empty -m "signed commit by nannie bernhard"`
`git commit --quiet -S
#{
GpgHelpers
::
User2
.
primary_keyid
}
--allow-empty -m "signed commit by bette cartwright"`
`git push --quiet`
end
end
end
it
'changes from unverified to verified when the user changes his email to match the gpg key'
do
user
=
create
:user
,
email:
'unrelated.user@example.org'
project
.
team
<<
[
user
,
:master
]
...
...
@@ -229,7 +215,7 @@ describe 'Commits' do
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -242,7 +228,7 @@ describe 'Commits' do
user
.
update_attributes!
(
email:
GpgHelpers
::
User1
.
emails
.
first
)
end
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -256,7 +242,7 @@ describe 'Commits' do
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -268,7 +254,7 @@ describe 'Commits' do
create
:gpg_key
,
key:
GpgHelpers
::
User1
.
public_key
,
user:
user
end
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
within
'#commits-list'
do
expect
(
page
).
to
have_content
'Unverified'
...
...
@@ -284,7 +270,7 @@ describe 'Commits' do
end
login_with
(
user
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
master
)
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:
'signed-commits'
)
click_on
'Verified'
within
'.popover'
do
...
...
spec/support/test_env.rb
View file @
5013f3a8
...
...
@@ -5,6 +5,7 @@ module TestEnv
# When developing the seed repository, comment out the branch you will modify.
BRANCH_SHA
=
{
'signed-commits'
=>
'5d4a1cb'
,
'not-merged-branch'
=>
'b83d6e3'
,
'branch-merged'
=>
'498214d'
,
'empty-branch'
=>
'7efb185'
,
...
...
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