FIX: Match for indeterminate depth in URL during upload tests (#15186)

Since the uploads id sequence counter isn't reset before test runs, the
URL might not be /1X/
This commit is contained in:
Daniel Waterworth
2021-12-03 16:05:27 -06:00
committed by GitHub
parent 6d2eae27a6
commit 959923d3cf

View File

@@ -19,7 +19,7 @@ module UploadsHelpers
end
def stub_upload(upload)
url = "https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/1X/#{upload.sha1}.#{upload.extension}?acl"
url = %r{https://#{SiteSetting.s3_upload_bucket}.s3.#{SiteSetting.s3_region}.amazonaws.com/original/\d+X.*#{upload.sha1}.#{upload.extension}\?acl}
stub_request(:put, url)
end