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
35ab27c2
Commit
35ab27c2
authored
Jul 16, 2019
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move import_export test fixtures to spec/fixtures
parent
8432ed98
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
spec/fixtures/lib/gitlab/import_export/project.group.json
spec/fixtures/lib/gitlab/import_export/project.group.json
+0
-0
spec/fixtures/lib/gitlab/import_export/project.json
spec/fixtures/lib/gitlab/import_export/project.json
+0
-0
spec/fixtures/lib/gitlab/import_export/project.light.json
spec/fixtures/lib/gitlab/import_export/project.light.json
+0
-0
spec/fixtures/lib/gitlab/import_export/project.milestone-iid.json
...tures/lib/gitlab/import_export/project.milestone-iid.json
+0
-0
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+6
-6
spec/lib/gitlab/import_export/relation_rename_service_spec.rb
.../lib/gitlab/import_export/relation_rename_service_spec.rb
+1
-1
No files found.
spec/lib/gitlab/import_export/project.group.json
→
spec/
fixtures/
lib/gitlab/import_export/project.group.json
View file @
35ab27c2
File moved
spec/lib/gitlab/import_export/project.json
→
spec/
fixtures/
lib/gitlab/import_export/project.json
View file @
35ab27c2
File moved
spec/lib/gitlab/import_export/project.light.json
→
spec/
fixtures/
lib/gitlab/import_export/project.light.json
View file @
35ab27c2
File moved
spec/lib/gitlab/import_export/project.milestone-iid.json
→
spec/
fixtures/
lib/gitlab/import_export/project.milestone-iid.json
View file @
35ab27c2
File moved
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
35ab27c2
...
...
@@ -14,7 +14,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
RSpec
::
Mocks
.
with_temporary_scope
do
@project
=
create
(
:project
,
:builds_enabled
,
:issues_disabled
,
name:
'project'
,
path:
'project'
)
@shared
=
@project
.
import_export_shared
allow
(
@shared
).
to
receive
(
:export_path
).
and_return
(
'spec/lib/gitlab/import_export/'
)
allow
(
@shared
).
to
receive
(
:export_path
).
and_return
(
'spec/
fixtures/
lib/gitlab/import_export/'
)
allow_any_instance_of
(
Repository
).
to
receive
(
:fetch_source_branch!
).
and_return
(
true
)
allow_any_instance_of
(
Gitlab
::
Git
::
Repository
).
to
receive
(
:branch_exists?
).
and_return
(
false
)
...
...
@@ -328,12 +328,12 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
let
(
:restored_project_json
)
{
project_tree_restorer
.
restore
}
before
do
allow
(
shared
).
to
receive
(
:export_path
).
and_return
(
'spec/lib/gitlab/import_export/'
)
allow
(
shared
).
to
receive
(
:export_path
).
and_return
(
'spec/
fixtures/
lib/gitlab/import_export/'
)
end
context
'with a simple project'
do
before
do
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/lib/gitlab/import_export/project.light.json"
)
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/
fixtures/
lib/gitlab/import_export/project.light.json"
)
restored_project_json
end
...
...
@@ -430,7 +430,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
end
before
do
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/lib/gitlab/import_export/project.group.json"
)
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/
fixtures/
lib/gitlab/import_export/project.group.json"
)
restored_project_json
end
...
...
@@ -459,7 +459,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
end
before
do
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/lib/gitlab/import_export/project.light.json"
)
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/
fixtures/
lib/gitlab/import_export/project.light.json"
)
end
it
'does not import any templated services'
do
...
...
@@ -501,7 +501,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
end
it
'preserves the project milestone IID'
do
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/lib/gitlab/import_export/project.milestone-iid.json"
)
project_tree_restorer
.
instance_variable_set
(
:@path
,
"spec/
fixtures/
lib/gitlab/import_export/project.milestone-iid.json"
)
expect_any_instance_of
(
Gitlab
::
ImportExport
::
Shared
).
not_to
receive
(
:error
)
...
...
spec/lib/gitlab/import_export/relation_rename_service_spec.rb
View file @
35ab27c2
...
...
@@ -21,7 +21,7 @@ describe Gitlab::ImportExport::RelationRenameService do
context
'when importing'
do
let
(
:project_tree_restorer
)
{
Gitlab
::
ImportExport
::
ProjectTreeRestorer
.
new
(
user:
user
,
shared:
shared
,
project:
project
)
}
let
(
:import_path
)
{
'spec/lib/gitlab/import_export'
}
let
(
:import_path
)
{
'spec/
fixtures/
lib/gitlab/import_export'
}
let
(
:file_content
)
{
IO
.
read
(
"
#{
import_path
}
/project.json"
)
}
let!
(
:json_file
)
{
ActiveSupport
::
JSON
.
decode
(
file_content
)
}
...
...
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