From 8ce5b82aa599216e51fad51cc632ca44ce235f7b Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Fri, 8 Sep 2023 11:17:08 +0800 Subject: [PATCH] DEV: Allow `CAPYBARA_REMOTE_DRIVER_URL` through webmock (#23476) Why this change? When using a remote capybara driver configured through the `CAPYBARA_REMOTE_DRIVER_URL` env, webmock is thinking that is an external request and blocking it. As such, we need to set the URL to the allowlist for webmock. --- spec/rails_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 67df4b67c39..7dc882cb25b 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -294,7 +294,8 @@ RSpec.configure do |config| allow: [ *MinioRunner.config.minio_urls, URI(MinioRunner::MinioBinary.platform_binary_url).host, - ], + ENV["CAPYBARA_REMOTE_DRIVER_URL"], + ].compact, ) if ENV["CAPYBARA_DEFAULT_MAX_WAIT_TIME"].present?