diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-16 10:28:21 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-07-16 10:28:21 +0000 |
commit | 01ad732f8d5d5bef3ee6faf20dfa2110feb344c0 (patch) | |
tree | 961cf73e29fbc1dcfea39facd3c97447e34b7e53 /spec/uploaders | |
parent | 6c237350b3967881cf9da50ec13a536e1a7e6755 (diff) | |
parent | 97ce0607d57d9a03fc6348a7ce3f9b069ced6c90 (diff) | |
download | gitlab-ce-01ad732f8d5d5bef3ee6faf20dfa2110feb344c0.tar.gz |
Merge branch '48745-project-exports-fail-when-uploads-have-been-migrated-to-object-storage' into 'master'
Resolve "Project exports fail when uploads have been migrated to object storage"
Closes #48745
See merge request gitlab-org/gitlab-ce!20484
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/file_uploader_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index 7ba28b4fc1f..3efe512a59c 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -124,6 +124,15 @@ describe FileUploader do end end + describe '.extract_dynamic_path' do + it 'works with hashed storage' do + path = 'export/4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a/test/uploads/72a497a02fe3ee09edae2ed06d390038/dummy.txt' + + expect(described_class.extract_dynamic_path(path)[:identifier]).to eq('dummy.txt') + expect(described_class.extract_dynamic_path(path)[:secret]).to eq('72a497a02fe3ee09edae2ed06d390038') + end + end + describe '#secret' do it 'generates a secret if none is provided' do expect(described_class).to receive(:generate_secret).and_return('secret') |