BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
daca1c65
Commit
daca1c65
authored
Oct 12, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests
parent
c61dc131
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
commit.rb
app/models/ci/commit.rb
+2
-2
commit_statuses.rb
lib/api/commit_statuses.rb
+1
-1
commit_spec.rb
spec/models/ci/commit_spec.rb
+5
-4
No files found.
app/models/ci/commit.rb
View file @
daca1c65
...
...
@@ -82,7 +82,7 @@ module Ci
end
def
stage
running_or_pending
=
statuses
.
latest
.
running_or_pending
running_or_pending
=
statuses
.
latest
.
running_or_pending
.
ordered
running_or_pending
.
first
.
try
(
:stage
)
end
...
...
@@ -189,7 +189,7 @@ module Ci
end
def
matrix_for_ref?
(
ref
)
latest_builds
_for_ref
(
ref
).
size
>
1
builds_without_retry
_for_ref
(
ref
).
size
>
1
end
def
config_processor
...
...
lib/api/commit_statuses.rb
View file @
daca1c65
...
...
@@ -43,7 +43,7 @@ module API
# Examples:
# POST /projects/:id/statuses/:sha
post
':id/statuses/:sha'
do
authorize!
:create_commit_status
es
,
user_project
authorize!
:create_commit_status
,
user_project
required_attributes!
[
:state
]
attrs
=
attributes_for_keys
[
:ref
,
:target_url
,
:description
,
:context
,
:name
]
commit
=
@project
.
commit
(
params
[
:sha
])
...
...
spec/models/ci/commit_spec.rb
View file @
daca1c65
...
...
@@ -125,7 +125,7 @@ describe Ci::Commit do
end
it
'returns all refs'
do
is_expected
.
to
contain_exactly
(
'master'
,
'develop'
)
is_expected
.
to
contain_exactly
(
'master'
,
'develop'
,
nil
)
end
end
...
...
@@ -225,9 +225,10 @@ describe Ci::Commit do
it
'rebuilds commit'
do
expect
(
commit
.
status
).
to
eq
(
'skipped'
)
expect
(
create_builds
(
trigger_request
)).
to
be_truthy
commit
.
builds
.
reload
expect
(
commit
.
builds
.
size
).
to
eq
(
2
)
expect
(
commit
.
status
).
to
eq
(
'pending'
)
# since everything in Ci::Commit is cached we need to fetch a new object
new_commit
=
Ci
::
Commit
.
find_by_id
(
commit
.
id
)
expect
(
new_commit
.
status
).
to
eq
(
'pending'
)
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