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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dfc7d7d3
Commit
dfc7d7d3
authored
Aug 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jenkins-tests' into 'master'
Jenkins tests See merge request !19
parents
1f2b1e46
f6fc176a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
CHANGELOG-EE
CHANGELOG-EE
+3
-2
spec/models/project_services/jenkins_service_spec.rb
spec/models/project_services/jenkins_service_spec.rb
+16
-10
No files found.
CHANGELOG-EE
View file @
dfc7d7d3
...
@@ -3,6 +3,7 @@ v 7.14
...
@@ -3,6 +3,7 @@ v 7.14
- Don't send "Added to group" notifications when group is LDAP synched
- Don't send "Added to group" notifications when group is LDAP synched
- Fix importing projects from GitHub Enterprise Edition.
- Fix importing projects from GitHub Enterprise Edition.
- Automatic approver suggestions (based on an authority of the code)
- Automatic approver suggestions (based on an authority of the code)
- Add support for Jenkins unstable status
v7.13.3
v7.13.3
- Merge community edition changes for version 7.13.3
- Merge community edition changes for version 7.13.3
...
...
spec/models/project_services/jenkins_service_spec.rb
View file @
dfc7d7d3
...
@@ -26,6 +26,15 @@ describe JenkinsService do
...
@@ -26,6 +26,15 @@ describe JenkinsService do
end
end
describe
'commits methods'
do
describe
'commits methods'
do
def
status_body_for_icon
(
state
)
body
=<<
eos
<h1 class="build-caption page-headline"><img style="width: 48px; height: 48px; " alt="Success" class="icon-
#{
state
}
icon-xlg" src="/static/855d7c3c/images/48x48/
#{
state
}
" tooltip="Success" title="Success">
Build #188
(Oct 15, 2014 9:45:21 PM)
</h1>
eos
end
before
do
before
do
@service
=
JenkinsService
.
new
@service
=
JenkinsService
.
new
allow
(
@service
).
to
receive_messages
(
allow
(
@service
).
to
receive_messages
(
...
@@ -33,19 +42,16 @@ describe JenkinsService do
...
@@ -33,19 +42,16 @@ describe JenkinsService do
project_url:
'http://jenkins.gitlab.org/projects/2'
,
project_url:
'http://jenkins.gitlab.org/projects/2'
,
token:
'verySecret'
token:
'verySecret'
)
)
body
=<<
eos
<h1 class="build-caption page-headline"><img style="width: 48px; height: 48px; " alt="Success" class="icon-blue icon-xlg" src="/static/855d7c3c/images/48x48/blue.png" tooltip="Success" title="Success">
Build #188
(Oct 15, 2014 9:45:21 PM)
</h1>
eos
stub_request
(
:get
,
"http://jenkins.gitlab.org/projects/2/scm/bySHA1/2ab7834c"
).
to_return
(
status:
200
,
body:
body
,
headers:
{})
end
end
describe
:commit_status
do
describe
:commit_status
do
it
{
expect
(
@service
.
commit_status
(
"2ab7834c"
,
'master'
)).
to
eq
(
"success"
)
}
statuses
=
{
'blue.png'
=>
'success'
,
'yellow.png'
=>
'failed'
,
'red.png'
=>
'failed'
,
'aborted.png'
=>
'failed'
,
'blue-anime.gif'
=>
'running'
,
'grey.png'
=>
'pending'
}
statuses
.
each
do
|
icon
,
state
|
it
"should have a status of
#{
state
}
when the icon
#{
icon
}
exists."
do
stub_request
(
:get
,
"http://jenkins.gitlab.org/projects/2/scm/bySHA1/2ab7834c"
).
to_return
(
status:
200
,
body:
status_body_for_icon
(
icon
),
headers:
{})
expect
(
@service
.
commit_status
(
"2ab7834c"
,
'master'
)).
to
eq
(
state
)
end
end
end
end
describe
:build_page
do
describe
:build_page
do
...
...
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