diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-05 11:16:17 +0000 |
---|---|---|
committer | Micaƫl Bergeron <mbergeron@gitlab.com> | 2018-03-08 10:20:40 -0500 |
commit | edbcde8877f497ea675fde811065679286a1aa56 (patch) | |
tree | beefe40d469f06fc72f2513f73b336115b0f6144 /spec/factories/lfs_objects.rb | |
parent | 2387ef2b4a9944749f0cd1db5c7e7f55f3745780 (diff) | |
download | gitlab-ce-edbcde8877f497ea675fde811065679286a1aa56.tar.gz |
[cherry-pick] '4862-verify-file-checksums'
See merge request gitlab-org/gitlab-ee!4753
Diffstat (limited to 'spec/factories/lfs_objects.rb')
-rw-r--r-- | spec/factories/lfs_objects.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/lfs_objects.rb b/spec/factories/lfs_objects.rb index 8eb709022ce..eaf3a4ed497 100644 --- a/spec/factories/lfs_objects.rb +++ b/spec/factories/lfs_objects.rb @@ -9,4 +9,14 @@ FactoryBot.define do trait :with_file do file { fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "`/png") } end + + # The uniqueness constraint means we can't use the correct OID for all LFS + # objects, so the test needs to decide which (if any) object gets it + trait :correct_oid do + oid 'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75' + end + + trait :object_storage do + file_store { LfsObjectUploader::Store::REMOTE } + end end |