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/factories | |
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/factories')
-rw-r--r-- | spec/factories/uploads.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories/uploads.rb b/spec/factories/uploads.rb index b45f6f30e40..a81b2169b89 100644 --- a/spec/factories/uploads.rb +++ b/spec/factories/uploads.rb @@ -28,6 +28,13 @@ FactoryBot.define do secret SecureRandom.hex end + trait :with_file do + after(:create) do |upload| + FileUtils.mkdir_p(File.dirname(upload.absolute_path)) + FileUtils.touch(upload.absolute_path) + end + end + trait :object_storage do store ObjectStorage::Store::REMOTE end |