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
5b17ff09
Commit
5b17ff09
authored
Nov 06, 2019
by
nmilojevic1
Committed by
Stan Hu
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move common methods to configuration_helper
parent
57dfc84f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
22 deletions
+1
-22
spec/features/projects/import_export/export_file_spec.rb
spec/features/projects/import_export/export_file_spec.rb
+0
-2
spec/lib/gitlab/import_export/attribute_configuration_spec.rb
.../lib/gitlab/import_export/attribute_configuration_spec.rb
+0
-10
spec/lib/gitlab/import_export/model_configuration_spec.rb
spec/lib/gitlab/import_export/model_configuration_spec.rb
+1
-10
No files found.
spec/features/projects/import_export/export_file_spec.rb
View file @
5b17ff09
...
...
@@ -12,8 +12,6 @@ describe 'Import/Export - project export integration test', :js do
let
(
:user
)
{
create
(
:admin
)
}
let
(
:export_path
)
{
"
#{
Dir
.
tmpdir
}
/import_file_spec"
}
let
(
:config_hash
)
{
Gitlab
::
ImportExport
::
Config
.
new
.
to_h
.
deep_stringify_keys
}
let
(
:sensitive_words
)
{
%w[pass secret token key encrypted html]
}
let
(
:safe_list
)
do
{
...
...
spec/lib/gitlab/import_export/attribute_configuration_spec.rb
View file @
5b17ff09
...
...
@@ -12,16 +12,6 @@ require 'spec_helper'
describe
'Import/Export attribute configuration'
do
include
ConfigurationHelper
let
(
:config_hash
)
{
Gitlab
::
ImportExport
::
Config
.
new
.
to_h
.
deep_stringify_keys
}
let
(
:relation_names
)
do
names
=
names_from_tree
(
config_hash
.
dig
(
'tree'
,
'project'
))
# Remove duplicated or add missing models
# - project is not part of the tree, so it has to be added manually.
# - milestone, labels have both singular and plural versions in the tree, so remove the duplicates.
names
.
flatten
.
uniq
-
%w(milestones labels)
+
[
'project'
]
end
let
(
:safe_attributes_file
)
{
'spec/lib/gitlab/import_export/safe_model_attributes.yml'
}
let
(
:safe_model_attributes
)
{
YAML
.
load_file
(
safe_attributes_file
)
}
...
...
spec/lib/gitlab/import_export/model_configuration_spec.rb
View file @
5b17ff09
...
...
@@ -8,19 +8,10 @@ require 'spec_helper'
describe
'Import/Export model configuration'
do
include
ConfigurationHelper
let
(
:config_hash
)
{
Gitlab
::
ImportExport
::
Config
.
new
.
to_h
.
deep_stringify_keys
}
let
(
:model_names
)
do
names
=
names_from_tree
(
config_hash
.
dig
(
'tree'
,
'project'
))
# Remove duplicated or add missing models
# - project is not part of the tree, so it has to be added manually.
# - milestone, labels, merge_request have both singular and plural versions in the tree, so remove the duplicates.
# - User, Author... Models we do not care about for checking models
names
.
flatten
.
uniq
-
%w(milestones labels user author merge_request)
+
[
'project'
]
end
let
(
:all_models_yml
)
{
'spec/lib/gitlab/import_export/all_models.yml'
}
let
(
:all_models_hash
)
{
YAML
.
load_file
(
all_models_yml
)
}
let
(
:current_models
)
{
setup_models
}
let
(
:model_names
)
{
relation_names
}
it
'has no new models'
do
model_names
.
each
do
|
model_name
|
...
...
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