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
e12b81ad
Commit
e12b81ad
authored
Sep 06, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update EE files to remove old storage logic
parent
29953ced
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
22 deletions
+3
-22
ee/lib/ee/gitlab/import_export/after_export_strategies/custom_template_export_import_strategy.rb
...port_strategies/custom_template_export_import_strategy.rb
+2
-6
ee/spec/controllers/projects_controller_spec.rb
ee/spec/controllers/projects_controller_spec.rb
+0
-15
ee/spec/lib/ee/gitlab/import_export/after_export_strategies/custom_template_export_import_strategy_spec.rb
...strategies/custom_template_export_import_strategy_spec.rb
+1
-1
No files found.
ee/lib/ee/gitlab/import_export/after_export_strategies/custom_template_export_import_strategy.rb
View file @
e12b81ad
...
...
@@ -28,16 +28,12 @@ module EE
::
RepositoryImportWorker
.
new
.
perform
(
export_into_project_id
)
ensure
export_file
.
close
if
export_file
.
respond_to?
(
:close
)
project
.
remove_export
ed_project_file
project
.
remove_export
s
end
def
export_file
strong_memoize
(
:export_file
)
do
if
object_storage?
project
.
import_export_upload
.
export_file
&
.
file
else
File
.
open
(
project
.
export_project_path
)
end
project
.
import_export_upload
.
export_file
&
.
file
end
end
...
...
ee/spec/controllers/projects_controller_spec.rb
View file @
e12b81ad
...
...
@@ -71,23 +71,8 @@ describe ProjectsController do
stub_ee_application_setting
(
custom_project_templates_group_id:
group
.
id
)
end
context
'old upload'
do
before
do
stub_feature_flags
(
import_export_object_storage:
false
)
end
it
'creates the project from project template'
do
post
:create
,
project:
templates_params
created_project
=
Project
.
find_by_path
(
'foo'
)
expect
(
flash
[
:notice
]).
to
eq
"Project 'foo' was successfully created."
expect
(
created_project
.
repository
.
empty?
).
to
be
false
end
end
context
'object storage'
do
before
do
stub_feature_flags
(
import_export_object_storage:
true
)
stub_uploads_object_storage
(
FileUploader
)
end
...
...
ee/spec/lib/ee/gitlab/import_export/after_export_strategies/custom_template_export_import_strategy_spec.rb
View file @
e12b81ad
...
...
@@ -42,7 +42,7 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
end
it
'removes the exported project file after the import'
do
expect
(
project_template
).
to
receive
(
:remove_export
ed_project_file
)
expect
(
project_template
).
to
receive
(
:remove_export
s
)
subject
.
execute
(
user
,
project_template
)
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