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
8bdb232b
Commit
8bdb232b
authored
May 27, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec
parent
a98a462f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+15
-0
No files found.
spec/requests/api/runner_spec.rb
View file @
8bdb232b
...
...
@@ -830,6 +830,21 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
end
end
context
'when job has been finished'
do
before
do
job
.
trace
.
set
(
'Job failed'
)
job
.
drop!
(
:script_failure
)
end
it
'does not update job status and job trace'
do
update_job
(
state:
'success'
,
trace:
'BUILD TRACE UPDATED'
)
expect
(
response
).
to
have_gitlab_http_status
(
403
)
expect
(
job
.
trace
.
raw
).
to
eq
'Job failed'
expect
(
job
).
to
be_failed
end
end
def
update_job
(
token
=
job
.
token
,
**
params
)
new_params
=
params
.
merge
(
token:
token
)
put
api
(
"/jobs/
#{
job
.
id
}
"
),
new_params
...
...
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