mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
DEV: Use a tmp directory for storing uploads in tests (#9554)
This avoids development-mode upload files from polluting the test environment
This commit is contained in:
@ -248,8 +248,8 @@ class S3Helper
|
||||
|
||||
def multisite_upload_path
|
||||
path = File.join("uploads", RailsMultisite::ConnectionManagement.current_db, "/")
|
||||
return path unless Discourse.is_parallel_test?
|
||||
File.join(path, ENV['TEST_ENV_NUMBER'].presence || '1', "/")
|
||||
return path if !Rails.env.test?
|
||||
File.join(path, "test_#{ENV['TEST_ENV_NUMBER'].presence || '0'}", "/")
|
||||
end
|
||||
|
||||
def s3_resource
|
||||
|
Reference in New Issue
Block a user