diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-11-14 16:11:53 -0800 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-12-01 15:26:41 -0800 |
commit | 3dc0b118eca3716c0cda841232e0789739627957 (patch) | |
tree | ea9217d3108a11557f254edaada6bd924f5e23f8 /spec/migrations | |
parent | 81f061d5a4ebefefe0efbc3c1f28b86b665a2b92 (diff) | |
download | gitlab-ce-3dc0b118eca3716c0cda841232e0789739627957.tar.gz |
Store paths relative to CarrierWave.root
So the path on source installs cannot be too long for our column.
And fix the column length test since Route.path is limited to 255 chars, it doesn’t matter how many nested groups there are.
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/track_untracked_uploads_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/migrations/track_untracked_uploads_spec.rb b/spec/migrations/track_untracked_uploads_spec.rb index 95496696bc6..83eb6bbd537 100644 --- a/spec/migrations/track_untracked_uploads_spec.rb +++ b/spec/migrations/track_untracked_uploads_spec.rb @@ -41,15 +41,13 @@ describe TrackUntrackedUploads, :migration, :sidekiq do component = 'a'*255 long_path = [ - CarrierWave.root, 'uploads', - [component] * Namespace::NUMBER_OF_ANCESTORS_ALLOWED, # namespaces - component, # project + component, # project.full_path component # filename ].flatten.join('/') record = UntrackedFile.create!(path: long_path) - expect(record.reload.path.size).to eq(5711) + expect(record.reload.path.size).to eq(519) end context 'with tracked and untracked uploads' do |