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
69d06713
Commit
69d06713
authored
Jul 21, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore to what it used to be
parent
83975914
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
builds_spec.rb
spec/requests/api/builds_spec.rb
+4
-23
No files found.
spec/requests/api/builds_spec.rb
View file @
69d06713
require
'spec_helper'
require
'spec_helper'
require_relative
'../shared/artifacts_context'
describe
API
::
API
,
api:
true
do
describe
API
::
API
,
api:
true
do
include
ApiHelpers
include
ApiHelpers
...
@@ -17,9 +16,6 @@ describe API::API, api: true do
...
@@ -17,9 +16,6 @@ describe API::API, api: true do
let
(
:query
)
{
''
}
let
(
:query
)
{
''
}
before
do
before
do
developer
build
get
api
(
"/projects/
#{
project
.
id
}
/builds?
#{
query
}
"
,
api_user
)
get
api
(
"/projects/
#{
project
.
id
}
/builds?
#{
query
}
"
,
api_user
)
end
end
...
@@ -83,9 +79,9 @@ describe API::API, api: true do
...
@@ -83,9 +79,9 @@ describe API::API, api: true do
context
'when user is authorized'
do
context
'when user is authorized'
do
context
'when pipeline has builds'
do
context
'when pipeline has builds'
do
before
do
before
do
developer
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
)
build
create
(
:ci_build
,
pipeline:
pipeline
)
create
(
:ci_build
,
pipeline:
pipeline
)
create
(
:ci_build
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
commit
.
id
}
/builds"
,
api_user
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
commit
.
id
}
/builds"
,
api_user
)
end
end
...
@@ -99,8 +95,6 @@ describe API::API, api: true do
...
@@ -99,8 +95,6 @@ describe API::API, api: true do
context
'when pipeline has no builds'
do
context
'when pipeline has no builds'
do
before
do
before
do
developer
branch_head
=
project
.
commit
(
'feature'
).
id
branch_head
=
project
.
commit
(
'feature'
).
id
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
branch_head
}
/builds"
,
api_user
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
branch_head
}
/builds"
,
api_user
)
end
end
...
@@ -115,7 +109,8 @@ describe API::API, api: true do
...
@@ -115,7 +109,8 @@ describe API::API, api: true do
context
'when user is not authorized'
do
context
'when user is not authorized'
do
before
do
before
do
build
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
)
create
(
:ci_build
,
pipeline:
pipeline
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
commit
.
id
}
/builds"
,
nil
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
commit
.
id
}
/builds"
,
nil
)
end
end
...
@@ -130,8 +125,6 @@ describe API::API, api: true do
...
@@ -130,8 +125,6 @@ describe API::API, api: true do
describe
'GET /projects/:id/builds/:build_id'
do
describe
'GET /projects/:id/builds/:build_id'
do
before
do
before
do
developer
get
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
"
,
api_user
)
get
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
"
,
api_user
)
end
end
...
@@ -153,8 +146,6 @@ describe API::API, api: true do
...
@@ -153,8 +146,6 @@ describe API::API, api: true do
describe
'GET /projects/:id/builds/:build_id/artifacts'
do
describe
'GET /projects/:id/builds/:build_id/artifacts'
do
before
do
before
do
developer
get
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/artifacts"
,
api_user
)
get
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/artifacts"
,
api_user
)
end
end
...
@@ -304,9 +295,6 @@ describe API::API, api: true do
...
@@ -304,9 +295,6 @@ describe API::API, api: true do
describe
'POST /projects/:id/builds/:build_id/cancel'
do
describe
'POST /projects/:id/builds/:build_id/cancel'
do
before
do
before
do
developer
reporter
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/cancel"
,
api_user
)
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/cancel"
,
api_user
)
end
end
...
@@ -340,9 +328,6 @@ describe API::API, api: true do
...
@@ -340,9 +328,6 @@ describe API::API, api: true do
let
(
:build
)
{
create
(
:ci_build
,
:canceled
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
:canceled
,
pipeline:
pipeline
)
}
before
do
before
do
developer
reporter
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/retry"
,
api_user
)
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/retry"
,
api_user
)
end
end
...
@@ -375,8 +360,6 @@ describe API::API, api: true do
...
@@ -375,8 +360,6 @@ describe API::API, api: true do
describe
'POST /projects/:id/builds/:build_id/erase'
do
describe
'POST /projects/:id/builds/:build_id/erase'
do
before
do
before
do
developer
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/erase"
,
user
)
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/erase"
,
user
)
end
end
...
@@ -407,8 +390,6 @@ describe API::API, api: true do
...
@@ -407,8 +390,6 @@ describe API::API, api: true do
describe
'POST /projects/:id/builds/:build_id/artifacts/keep'
do
describe
'POST /projects/:id/builds/:build_id/artifacts/keep'
do
before
do
before
do
developer
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/artifacts/keep"
,
user
)
post
api
(
"/projects/
#{
project
.
id
}
/builds/
#{
build
.
id
}
/artifacts/keep"
,
user
)
end
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