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
15717060
Commit
15717060
authored
Sep 06, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix custom template export import strategy spec
parent
e12b81ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
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
+8
-19
No files found.
ee/spec/lib/ee/gitlab/import_export/after_export_strategies/custom_template_export_import_strategy_spec.rb
View file @
15717060
...
@@ -23,14 +23,13 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
...
@@ -23,14 +23,13 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
describe
'#execute'
do
describe
'#execute'
do
it
'updates the project import_source with the path to import'
do
it
'updates the project import_source with the path to import'
do
path
=
Tempfile
.
new
.
path
file
=
fixture_file_upload
(
'spec/fixtures/project_export.tar.gz'
)
allow
(
subject
).
to
receive
(
:import_upload_path
).
and_return
(
path
)
allow
(
subject
).
to
receive
(
:export_file
).
and_return
(
file
)
expect
(
Project
).
to
receive
(
:update
).
with
(
project
.
id
,
import_source:
path
).
and_call_original
subject
.
execute
(
user
,
project_template
)
subject
.
execute
(
user
,
project_template
)
expect
(
project
.
reload
.
import_
source
).
to
eq
path
expect
(
project
.
reload
.
import_
export_upload
.
import_file
.
file
).
not_to
be_nil
end
end
it
'imports repository'
do
it
'imports repository'
do
...
@@ -48,21 +47,12 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
...
@@ -48,21 +47,12 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
end
end
describe
'export_file'
do
describe
'export_file'
do
let
(
:project_template
)
{
create
(
:project
,
:with_export
)
}
before
do
before
do
allow
(
subject
).
to
receive
(
:project
).
and_return
(
project_template
)
allow
(
subject
).
to
receive
(
:project
).
and_return
(
project_template
)
end
end
context
'without object storage'
do
it
'returns the local path'
do
subject
.
execute
(
user
,
project_template
)
expect
(
subject
.
send
(
:export_file
)).
not_to
be_nil
end
end
context
'with object storage'
do
let
(
:project_template
)
{
create
(
:project
,
:with_object_export
)
}
it
'returns the path from object storage'
do
it
'returns the path from object storage'
do
subject
.
execute
(
user
,
project_template
)
subject
.
execute
(
user
,
project_template
)
...
@@ -70,5 +60,4 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
...
@@ -70,5 +60,4 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
end
end
end
end
end
end
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