diff options
author | James Lopez <james@jameslopez.es> | 2017-01-24 12:06:09 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-30 12:34:32 +0100 |
commit | e589c7e84854bd181d5059200e80f0b5c0b0e5f8 (patch) | |
tree | 2cea8b9a9b7f14c73ba9fa94fcb0f8ebde7724d4 /spec/lib | |
parent | 067ce273a592abbcc7d9e417a5466ba113882dca (diff) | |
download | gitlab-ce-e589c7e84854bd181d5059200e80f0b5c0b0e5f8.tar.gz |
Ignore encrypted attributes in Import/Export
* Regenerates tokens for all models that have them
* Remove variables, since they are basically just storing encrypted data
* Bumped version up to 0.1.6
* Updated related docs
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/import_export/project.json | 13 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/project_tree_restorer_spec.rb | 14 |
2 files changed, 23 insertions, 4 deletions
diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json index 2c0750c3377..2e9f60432b4 100644 --- a/spec/lib/gitlab/import_export/project.json +++ b/spec/lib/gitlab/import_export/project.json @@ -6981,11 +6981,16 @@ ] } ], - "variables": [ - - ], "triggers": [ - + { + "id": 123, + "token": "cdbfasdf44a5958c83654733449e585", + "project_id": null, + "deleted_at": null, + "created_at": "2017-01-16T15:25:28.637Z", + "updated_at": "2017-01-16T15:25:28.637Z", + "gl_project_id": 123 + } ], "deploy_keys": [ diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb index 4b07fa53bf5..75c8b997b4f 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -197,6 +197,20 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do expect(restored_project_json).to be true end end + + context 'tokens are regenerated' do + before do + restored_project_json + end + + it 'has a new CI triggers token' do + expect(Ci::Trigger.where(token: 'cdbfasdf44a5958c83654733449e585')).to be_empty + end + + it 'has a new CI triggers token' do + expect(Ci::Build.where(token: 'abcd')).to be_empty + end + end end end end |