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
5b8613b8
Commit
5b8613b8
authored
Sep 13, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test with inactive error use case for 'POST /ci/api/v1/builds/register.json'
parent
f369e62a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
spec/factories/ci/runners.rb
spec/factories/ci/runners.rb
+4
-0
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+10
-0
No files found.
spec/factories/ci/runners.rb
View file @
5b8613b8
...
...
@@ -30,5 +30,9 @@ FactoryGirl.define do
trait
:shared
do
is_shared
true
end
trait
:inactive
do
active
false
end
end
end
spec/requests/ci/api/builds_spec.rb
View file @
5b8613b8
...
...
@@ -158,6 +158,16 @@ describe Ci::API::API do
end
end
context
'when runner is paused'
do
let
(
:inactive_runner
)
{
create
(
:ci_runner
,
:inactive
,
token:
"InactiveRunner"
)
}
before
do
register_builds
inactive_runner
.
token
end
it
{
expect
(
response
).
to
have_http_status
404
}
end
def
register_builds
(
token
=
runner
.
token
,
**
params
)
post
ci_api
(
"/builds/register"
),
params
.
merge
(
token:
token
),
{
'User-Agent'
=>
user_agent
}
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