diff options
author | James Lopez <james@jameslopez.es> | 2017-01-25 10:17:50 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-30 12:34:32 +0100 |
commit | eeb13c16d1f627eba10313bf5c4662416392feb3 (patch) | |
tree | 1312863d67a633d2e8187feb0e0e965e224f9a9e | |
parent | bb2201267550433f3db6a49086076ca3937da191 (diff) | |
download | gitlab-ce-eeb13c16d1f627eba10313bf5c4662416392feb3.tar.gz |
rename method and added note to export file spec about new encrypted attributes
-rw-r--r-- | lib/gitlab/import_export/relation_factory.rb | 4 | ||||
-rw-r--r-- | spec/features/projects/import_export/export_file_spec.rb | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index 8a44e78fb44..cb9f20a70a0 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -62,7 +62,7 @@ module Gitlab update_project_references handle_group_label if group_label? - reset_ci_tokens! + reset_tokens! @relation_hash['data'].deep_symbolize_keys! if @relation_name == :events && @relation_hash['data'] set_st_diffs if @relation_name == :merge_request_diff @@ -142,7 +142,7 @@ module Gitlab end end - def reset_ci_tokens! + def reset_tokens! return unless Gitlab::ImportExport.reset_tokens? && TOKEN_RESET_MODELS.include?(@relation_name.to_s) # If we import/export a project to the same instance, tokens will have to be reset. diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb index 52d08982c7a..2fbfe045b7f 100644 --- a/spec/features/projects/import_export/export_file_spec.rb +++ b/spec/features/projects/import_export/export_file_spec.rb @@ -74,6 +74,9 @@ feature 'Import/Export - project export integration test', feature: true, js: tr Otherwise, please add the exception to +safe_list+ in CURRENT_SPEC using #{sensitive_word} as the key and the correspondent hash or model as the value. + Also, if the attribute is encrypted, please add it to either the list of excluded attributes in IMPORT_EXPORT_CONFIG + or the model to RelationFactory::TOKEN_RESET_MODELS if it includes a token that can be reset. + IMPORT_EXPORT_CONFIG: #{Gitlab::ImportExport.config_file} CURRENT_SPEC: #{__FILE__} MSG |