diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-13 12:45:34 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-13 12:45:34 +0300 |
commit | a66af9b121d3f03f46a689cb9bb0867628618974 (patch) | |
tree | d0538dd5c1b3b29365df7662c4e673a7e2afe405 /spec/uploaders | |
parent | 82c638d9f65db5d1beb6869aaeea01c43cac22d8 (diff) | |
parent | 3961407248c55f0524c8acfa154ace4ed33e087a (diff) |
Merge branch '47513-upload-migration-lease-key-is-incorrect-for-non-mounted-uploaders' into 'master'
Resolve "Upload migration lease key is incorrect for non-mounted uploaders"
Closes #47513
See merge request gitlab-org/gitlab-ce!19600
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/object_storage_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb index b497ddc3e67..c7f5694ff43 100644 --- a/spec/uploaders/object_storage_spec.rb +++ b/spec/uploaders/object_storage_spec.rb @@ -332,6 +332,18 @@ describe ObjectStorage do expect { uploader.use_file }.to raise_error(ObjectStorage::ExclusiveLeaseTaken) end end + + it 'can still migrate other files of the same model' do + uploader2 = uploader_class.new(object, :file) + uploader2.upload = create(:upload) + uploader.upload = create(:upload) + + when_file_is_in_use do + expect(uploader2).to receive(:unsafe_migrate!) + + uploader2.migrate!(described_class::Store::REMOTE) + end + end end describe '#fog_credentials' do |