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
45b2d0f6
Commit
45b2d0f6
authored
Feb 17, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Don't create the project when it's being imported
parent
8a318984
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/workers/geo_repository_create_worker.rb
app/workers/geo_repository_create_worker.rb
+1
-1
spec/workers/geo_repository_create_worker_spec.rb
spec/workers/geo_repository_create_worker_spec.rb
+7
-0
No files found.
app/workers/geo_repository_create_worker.rb
View file @
45b2d0f6
...
...
@@ -6,6 +6,6 @@ class GeoRepositoryCreateWorker
project
=
Project
.
find
(
id
)
project
.
ensure_dir_exist
project
.
create_repository
unless
project
.
repository_exists?
project
.
create_repository
unless
project
.
repository_exists?
||
project
.
import?
end
end
spec/workers/geo_repository_create_worker_spec.rb
View file @
45b2d0f6
...
...
@@ -15,6 +15,13 @@ describe GeoRepositoryCreateWorker do
perform!
end
it
'does not create the repository when its being imported'
do
expect
(
project
).
to
receive
(
:import?
)
{
true
}
expect
(
project
).
not_to
receive
(
:create_repository
)
perform!
end
end
context
'when repository exists'
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