Fix uploads in CI becoming empty files
What does this MR do and why?
This is a workaround for a Docker bug where copying temp files result in an empty file: https://github.com/docker/for-linux/issues/1015. This causes all upload-related specs to fail.
This patches Rack::Test::UploadedFile
because this creates a Tempfile
that is then copied by Carrierwave to the file storage path which triggers the bug.
How to set up and validate locally
Using GCK, run:
bin/rspec ee/spec/services/projects/update_pages_service_spec.rb:31
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #346825 (closed)
Edited by Heinrich Lee Yu