DEV: Fix race conditions due to directory removal for uploads spec.

This commit is contained in:
Guo Xiang Tan 2020-06-03 12:23:46 +08:00
parent 141fba8866
commit 04a291ceea
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
2 changed files with 1 additions and 3 deletions

View File

@ -47,8 +47,6 @@ RSpec.describe FileStore::BaseStore do
describe '#download' do
before do
`rm -rf #{FileStore::BaseStore::CACHE_DIR}`
SiteSetting.enable_s3_uploads = true
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
SiteSetting.s3_access_key_id = "some key"

View File

@ -2,7 +2,7 @@
Fabricator(:upload) do
user
sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest(n.to_s) } }
sha1 { sequence(:sha1) { |n| Digest::SHA1.hexdigest("#{n}#{Process.pid}") } }
original_filename "logo.png"
filesize 1234
width 100