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
fda6ecb3
Commit
fda6ecb3
authored
Jun 21, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Specs for GeoRepositoryDestroyWorker to cover repo on disk removal
parent
1695d791
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
spec/workers/geo_repository_destroy_worker_spec.rb
spec/workers/geo_repository_destroy_worker_spec.rb
+29
-0
No files found.
spec/workers/geo_repository_destroy_worker_spec.rb
0 → 100644
View file @
fda6ecb3
require
'spec_helper'
describe
GeoRepositoryDestroyWorker
do
let!
(
:project
)
{
create
:project_empty_repo
}
let!
(
:path
)
{
project
.
repository
.
path_with_namespace
}
let!
(
:remove_path
)
{
path
.
sub
(
/\.git\Z/
,
"+
#{
project
.
id
}
+deleted.git"
)
}
let
(
:perform!
)
{
subject
.
perform
(
project
.
id
,
project
.
name
,
path
)
}
before
do
project
.
delete
end
it
'delegates project removal to Projects::DestroyService'
do
expect_any_instance_of
(
::
Projects
::
DestroyService
).
to
receive
(
:geo_replicate
)
perform!
end
context
'sidekiq execution'
do
it
'removes the repository from disk'
do
expect
(
project
.
gitlab_shell
.
exists?
(
project
.
repository_storage_path
,
path
+
'.git'
)).
to
be_truthy
Sidekiq
::
Testing
.
inline!
{
perform!
}
expect
(
project
.
gitlab_shell
.
exists?
(
project
.
repository_storage_path
,
path
+
'.git'
)).
to
be_falsey
expect
(
project
.
gitlab_shell
.
exists?
(
project
.
repository_storage_path
,
remove_path
+
'.git'
)).
to
be_falsey
end
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