From 80a572d3b7165210bbde19b143dcc7ec7187d85d Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 22 Apr 2020 14:04:45 -0400 Subject: [PATCH] FIX: Multisite spec was failing in parallel environment We were not adding the test number to the path in all places. --- lib/s3_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/s3_helper.rb b/lib/s3_helper.rb index 15e137b7606..5763921caa4 100644 --- a/lib/s3_helper.rb +++ b/lib/s3_helper.rb @@ -247,7 +247,9 @@ class S3Helper end def multisite_upload_path - File.join("uploads", RailsMultisite::ConnectionManagement.current_db, "/") + path = File.join("uploads", RailsMultisite::ConnectionManagement.current_db, "/") + return path unless Discourse.is_parallel_test? + File.join(path, ENV['TEST_ENV_NUMBER'].presence || '1', "/") end def s3_resource