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
186ce3ad
Commit
186ce3ad
authored
Jun 15, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the other renaming
parent
9dd06059
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+8
-8
spec/requests/api/jobs_spec.rb
spec/requests/api/jobs_spec.rb
+5
-5
No files found.
spec/features/projects/jobs_spec.rb
View file @
186ce3ad
...
@@ -306,12 +306,12 @@ feature 'Jobs', :feature do
...
@@ -306,12 +306,12 @@ feature 'Jobs', :feature do
end
end
end
end
context
'
build
project is over shared runners limit'
do
context
'
job
project is over shared runners limit'
do
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
,
shared_runners_enabled:
true
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
,
shared_runners_enabled:
true
)
}
it
'displays a warning message'
do
it
'displays a warning message'
do
visit
namespace_project_
build_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_
job_path
(
project
.
namespace
,
project
,
job
)
expect
(
page
).
to
have_content
(
'You have used all your shared Runners pipeline minutes.'
)
expect
(
page
).
to
have_content
(
'You have used all your shared Runners pipeline minutes.'
)
end
end
...
@@ -335,9 +335,9 @@ feature 'Jobs', :feature do
...
@@ -335,9 +335,9 @@ feature 'Jobs', :feature do
context
"Job from other project"
do
context
"Job from other project"
do
before
do
before
do
build
.
run!
job
.
run!
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
job
)
page
.
driver
.
post
(
cancel_namespace_project_job_path
(
project
.
namespace
,
project
,
build
2
))
page
.
driver
.
post
(
cancel_namespace_project_job_path
(
project
.
namespace
,
project
,
job
2
))
end
end
it
{
expect
(
page
.
status_code
).
to
eq
(
404
)
}
it
{
expect
(
page
.
status_code
).
to
eq
(
404
)
}
...
@@ -366,10 +366,10 @@ feature 'Jobs', :feature do
...
@@ -366,10 +366,10 @@ feature 'Jobs', :feature do
context
"Job from other project"
do
context
"Job from other project"
do
before
do
before
do
build
.
run!
job
.
run!
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
job
)
click_link
'Cancel'
click_link
'Cancel'
page
.
driver
.
post
(
retry_namespace_project_job_path
(
project
.
namespace
,
project
,
build
2
))
page
.
driver
.
post
(
retry_namespace_project_job_path
(
project
.
namespace
,
project
,
job
2
))
end
end
it
{
expect
(
page
).
to
have_http_status
(
404
)
}
it
{
expect
(
page
).
to
have_http_status
(
404
)
}
...
...
spec/requests/api/jobs_spec.rb
View file @
186ce3ad
...
@@ -26,7 +26,7 @@ describe API::Jobs, :api do
...
@@ -26,7 +26,7 @@ describe API::Jobs, :api do
let
(
:query
)
{
Hash
.
new
}
let
(
:query
)
{
Hash
.
new
}
before
do
before
do
build
job
get
api
(
"/projects/
#{
project
.
id
}
/jobs"
,
api_user
),
query
get
api
(
"/projects/
#{
project
.
id
}
/jobs"
,
api_user
),
query
end
end
...
@@ -90,7 +90,7 @@ describe API::Jobs, :api do
...
@@ -90,7 +90,7 @@ describe API::Jobs, :api do
let
(
:query
)
{
Hash
.
new
}
let
(
:query
)
{
Hash
.
new
}
before
do
before
do
build
job
get
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
/jobs"
,
api_user
),
query
get
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
/jobs"
,
api_user
),
query
end
end
...
@@ -209,7 +209,7 @@ describe API::Jobs, :api do
...
@@ -209,7 +209,7 @@ describe API::Jobs, :api do
it
'returns specific job artifacts'
do
it
'returns specific job artifacts'
do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
.
headers
).
to
include
(
download_headers
)
expect
(
response
.
headers
).
to
include
(
download_headers
)
expect
(
response
.
body
).
to
match_file
(
build
.
artifacts_file
.
file
.
file
)
expect
(
response
.
body
).
to
match_file
(
job
.
artifacts_file
.
file
.
file
)
end
end
end
end
...
@@ -223,7 +223,7 @@ describe API::Jobs, :api do
...
@@ -223,7 +223,7 @@ describe API::Jobs, :api do
end
end
context
'when artifacts are stored remotely'
do
context
'when artifacts are stored remotely'
do
let
(
:
build
)
{
create
(
:ci_build
,
:artifacts
,
:remote_store
,
pipeline:
pipeline
)
}
let
(
:
job
)
{
create
(
:ci_build
,
:artifacts
,
:remote_store
,
pipeline:
pipeline
)
}
it
'returns location redirect'
do
it
'returns location redirect'
do
expect
(
response
).
to
have_http_status
(
302
)
expect
(
response
).
to
have_http_status
(
302
)
...
@@ -309,7 +309,7 @@ describe API::Jobs, :api do
...
@@ -309,7 +309,7 @@ describe API::Jobs, :api do
end
end
context
'when artifacts are stored remotely'
do
context
'when artifacts are stored remotely'
do
let
(
:
build
)
{
create
(
:ci_build
,
:artifacts
,
:remote_store
,
pipeline:
pipeline
)
}
let
(
:
job
)
{
create
(
:ci_build
,
:artifacts
,
:remote_store
,
pipeline:
pipeline
)
}
it
'returns location redirect'
do
it
'returns location redirect'
do
expect
(
response
).
to
have_http_status
(
302
)
expect
(
response
).
to
have_http_status
(
302
)
...
...
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