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
35a81d13
Commit
35a81d13
authored
Jul 21, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename path_with_namespace -> disk_path (EE)
parent
289a164b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/workers/geo_repository_destroy_worker.rb
app/workers/geo_repository_destroy_worker.rb
+2
-2
spec/services/ee/projects/destroy_service_spec.rb
spec/services/ee/projects/destroy_service_spec.rb
+2
-2
spec/workers/geo_repository_destroy_worker_spec.rb
spec/workers/geo_repository_destroy_worker_spec.rb
+1
-1
No files found.
app/workers/geo_repository_destroy_worker.rb
View file @
35a81d13
...
...
@@ -21,9 +21,9 @@ class GeoRepositoryDestroyWorker
# we need to probe on all existing ones.
#
# if we don't find it means it has already been deleted and we just return
def
probe_repository_storage
(
full
_path
)
def
probe_repository_storage
(
repo
_path
)
Gitlab
.
config
.
repositories
.
storages
.
each
do
|
repository_storage
,
rs_data
|
return
repository_storage
if
gitlab_shell
.
exists?
(
rs_data
[
'path'
],
full
_path
+
'.git'
)
return
repository_storage
if
gitlab_shell
.
exists?
(
rs_data
[
'path'
],
repo
_path
+
'.git'
)
end
nil
...
...
spec/services/ee/projects/destroy_service_spec.rb
View file @
35a81d13
...
...
@@ -6,8 +6,8 @@ describe Projects::DestroyService do
let!
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
user
.
namespace
)
}
let!
(
:project_id
)
{
project
.
id
}
let!
(
:project_name
)
{
project
.
name
}
let!
(
:project_path
)
{
project
.
path_with_namespace
}
let!
(
:wiki_path
)
{
project
.
path_with_namespace
+
'.wiki'
}
let!
(
:project_path
)
{
project
.
disk_path
}
let!
(
:wiki_path
)
{
project
.
disk_path
+
'.wiki'
}
let!
(
:storage_name
)
{
project
.
repository_storage
}
let!
(
:storage_path
)
{
project
.
repository_storage_path
}
...
...
spec/workers/geo_repository_destroy_worker_spec.rb
View file @
35a81d13
...
...
@@ -29,7 +29,7 @@ describe GeoRepositoryDestroyWorker do
describe
'#probe_repository_storage'
do
it
'returns a repository_storage when repository can be found'
do
expect
(
subject
.
send
(
:probe_repository_storage
,
project
.
path_with_namespace
)).
to
eq
(
'default'
)
expect
(
subject
.
send
(
:probe_repository_storage
,
project
.
full_path
)).
to
eq
(
'default'
)
end
it
'returns nil when repository cannot be found in any existing repository_storage'
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