FIX: parallel spec system needs needs a dedicated upload folder for each worker. (#8372)
This commit is contained in:
parent
f83125f0c2
commit
42e5176bc3
|
@ -31,7 +31,13 @@ module FileStore
|
|||
end
|
||||
|
||||
def upload_path
|
||||
File.join("uploads", RailsMultisite::ConnectionManagement.current_db)
|
||||
if ENV['RAILS_ENV'] != "test" || !ENV['TEST_ENV_NUMBER']
|
||||
return File.join("uploads", RailsMultisite::ConnectionManagement.current_db)
|
||||
end
|
||||
|
||||
# Parallel spec system
|
||||
n = ENV['TEST_ENV_NUMBER'].presence || '1'
|
||||
File.join("uploads", RailsMultisite::ConnectionManagement.current_db, n)
|
||||
end
|
||||
|
||||
def has_been_uploaded?(url)
|
||||
|
|
Loading…
Reference in New Issue