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
5b8613b8
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
runners.rb
spec/factories/ci/runners.rb
+4
-0
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