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
6fb4a533
Commit
6fb4a533
authored
Jan 04, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature test for resetting runner caches
parent
0f137d8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+36
-0
No files found.
spec/features/projects/pipelines/pipelines_spec.rb
View file @
6fb4a533
...
...
@@ -545,6 +545,42 @@ describe 'Pipelines', :js do
end
end
end
describe
'Reset runner caches'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
create
(
:ci_empty_pipeline
,
status:
'success'
,
project:
project
,
sha:
project
.
commit
.
id
,
ref:
'master'
)
project
.
team
<<
[
user
,
:master
]
visit
project_pipelines_path
(
project
)
end
it
'has a clear caches button'
do
expect
(
page
).
to
have_link
'Clear runner caches'
end
describe
'user clicks the button'
do
subject
{
click_link
'Clear runner caches'
}
context
'when project already has jobs_cache_index'
do
before
do
project
.
update_attributes
(
jobs_cache_index:
1
)
end
it
'increments jobs_cache_index'
do
expect
{
subject
}.
to
change
{
project
.
reload
.
jobs_cache_index
}.
by
(
1
)
expect
(
page
.
find
(
'.flash-notice'
)).
to
have_content
'Project cache successfully reset.'
end
end
context
'when project does not have jobs_cache_index'
do
it
'sets jobs_cache_index to 1'
do
expect
{
subject
}.
to
change
{
project
.
reload
.
jobs_cache_index
}.
from
(
nil
).
to
(
1
)
expect
(
page
.
find
(
'.flash-notice'
)).
to
have_content
'Project cache successfully reset.'
end
end
end
end
end
context
'when user is not logged in'
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