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
9129c37c
Commit
9129c37c
authored
May 05, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CI API tests for runner config and untagged jobs
parent
83df6384
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
spec/requests/ci/api/builds_spec.rb
spec/requests/ci/api/builds_spec.rb
+32
-0
No files found.
spec/requests/ci/api/builds_spec.rb
View file @
9129c37c
...
@@ -128,6 +128,38 @@ describe Ci::API::API do
...
@@ -128,6 +128,38 @@ describe Ci::API::API do
end
end
end
end
end
end
context
'when build has no tags'
do
before
do
commit
=
create
(
:ci_commit
,
project:
project
)
create
(
:ci_build
,
commit:
commit
,
tags:
[])
end
context
'when runner is allowed to pick untagged builds'
do
before
{
runner
.
update_column
(
:run_untagged
,
true
)
}
it
'picks build'
do
register_builds
expect
(
response
).
to
have_http_status
201
end
end
context
'when runner is not allowed to pick untagged builds'
do
before
{
runner
.
update_column
(
:run_untagged
,
false
)
}
it
'does not pick build'
do
register_builds
expect
(
response
).
to
have_http_status
404
end
end
def
register_builds
post
ci_api
(
"/builds/register"
),
token:
runner
.
token
,
info:
{
platform: :darwin
}
end
end
end
end
describe
"PUT /builds/:id"
do
describe
"PUT /builds/:id"
do
...
...
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