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
559a85ec
Commit
559a85ec
authored
Jun 06, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test failures
parent
b27f9848
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
spec/requests/api/jobs_spec.rb
spec/requests/api/jobs_spec.rb
+5
-3
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+7
-4
spec/requests/api/v3/builds_spec.rb
spec/requests/api/v3/builds_spec.rb
+7
-2
No files found.
spec/requests/api/jobs_spec.rb
View file @
559a85ec
require
'spec_helper'
describe
API
::
Jobs
,
:api
do
let
!
(
:project
)
do
let
(
:project
)
do
create
(
:project
,
:repository
,
public_builds:
false
)
end
let
!
(
:pipeline
)
do
let
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
project
.
default_branch
)
end
let
!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:api_user
)
{
user
}
...
...
@@ -26,6 +26,7 @@ describe API::Jobs, :api do
let
(
:query
)
{
Hash
.
new
}
before
do
build
get
api
(
"/projects/
#{
project
.
id
}
/jobs"
,
api_user
),
query
end
...
...
@@ -89,6 +90,7 @@ describe API::Jobs, :api do
let
(
:query
)
{
Hash
.
new
}
before
do
build
get
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
/jobs"
,
api_user
),
query
end
...
...
spec/requests/api/runner_spec.rb
View file @
559a85ec
...
...
@@ -185,7 +185,7 @@ describe API::Runner do
let
(
:project
)
{
create
(
:empty_project
,
shared_runners_enabled:
false
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline_without_jobs
,
project:
project
,
ref:
'master'
)
}
let
(
:runner
)
{
create
(
:ci_runner
)
}
let
!
(
:job
)
do
let
(
:job
)
do
create
(
:ci_build
,
:artifacts
,
:extended_options
,
pipeline:
pipeline
,
name:
'spinach'
,
stage:
'test'
,
stage_idx:
0
,
commands:
"ls
\n
date"
)
end
...
...
@@ -197,7 +197,10 @@ describe API::Runner do
let!
(
:new_update
)
{
}
let
(
:user_agent
)
{
'gitlab-runner 9.0.0 (9-0-stable; go1.7.4; linux/amd64)'
}
before
{
stub_container_registry_config
(
enabled:
false
)
}
before
do
job
stub_container_registry_config
(
enabled:
false
)
end
shared_examples
'no jobs available'
do
before
{
request_job
}
...
...
@@ -1069,7 +1072,7 @@ describe API::Runner do
{
'Content-Transfer-Encoding'
=>
'binary'
,
'Content-Disposition'
=>
'attachment; filename=ci_build_artifacts.zip'
}
end
it
'download artifacts'
do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
.
headers
).
to
include
download_headers
...
...
@@ -1078,7 +1081,7 @@ describe API::Runner do
context
'when artifacts are stored remotely'
do
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
:remote_store
)
}
it
'download artifacts'
do
expect
(
response
).
to
have_http_status
(
302
)
end
...
...
spec/requests/api/v3/builds_spec.rb
View file @
559a85ec
...
...
@@ -7,13 +7,14 @@ describe API::V3::Builds do
let!
(
:developer
)
{
create
(
:project_member
,
:developer
,
user:
user
,
project:
project
)
}
let
(
:reporter
)
{
create
(
:project_member
,
:reporter
,
project:
project
)
}
let
(
:guest
)
{
create
(
:project_member
,
:guest
,
project:
project
)
}
let
!
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
project
.
default_branch
)
}
let
!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
project
.
default_branch
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
describe
'GET /projects/:id/builds '
do
let
(
:query
)
{
''
}
before
do
build
create
(
:ci_build
,
:skipped
,
pipeline:
pipeline
)
get
v3_api
(
"/projects/
#{
project
.
id
}
/builds?
#{
query
}
"
,
api_user
)
...
...
@@ -87,6 +88,10 @@ describe API::V3::Builds do
end
describe
'GET /projects/:id/repository/commits/:sha/builds'
do
before
do
build
end
context
'when commit does not exist in repository'
do
before
do
get
v3_api
(
"/projects/
#{
project
.
id
}
/repository/commits/1a271fd1/builds"
,
api_user
)
...
...
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