From 959923d3cf0d058630ef4c84070eddbf32a1161b Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Fri, 3 Dec 2021 16:05:27 -0600 Subject: [PATCH] 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/ --- spec/support/uploads_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/uploads_helpers.rb b/spec/support/uploads_helpers.rb index 35c57fc940b..b0cfe5452c8 100644 --- a/spec/support/uploads_helpers.rb +++ b/spec/support/uploads_helpers.rb @@ -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