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
32347415
Commit
32347415
authored
Jan 24, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 409 conflict tests
parent
7fe16110
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+14
-0
No files found.
spec/requests/ci/api/builds_spec.rb
View file @
32347415
...
@@ -91,6 +91,20 @@ describe Ci::API::Builds do
...
@@ -91,6 +91,20 @@ describe Ci::API::Builds do
expect
{
register_builds
}.
to
change
{
runner
.
reload
.
contacted_at
}
expect
{
register_builds
}.
to
change
{
runner
.
reload
.
contacted_at
}
end
end
context
'when concurrently updating build'
do
before
do
expect_any_instance_of
(
Ci
::
Build
).
to
receive
(
:run!
).
and_raise
(
ActiveRecord
::
StaleObjectError
.
new
(
nil
,
nil
))
end
it
'returns a conflict'
do
register_builds
info:
{
platform: :darwin
}
expect
(
response
).
to
have_http_status
(
409
)
expect
(
response
.
headers
).
not_to
have_key
(
'X-GitLab-Last-Update'
)
end
end
context
'registry credentials'
do
context
'registry credentials'
do
let
(
:registry_credentials
)
do
let
(
:registry_credentials
)
do
{
'type'
=>
'registry'
,
{
'type'
=>
'registry'
,
...
...
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