From 577aa709456826d2d2fe91af41c514f82a30fbab Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Thu, 14 Mar 2024 11:21:08 -0400 Subject: [PATCH] =?UTF-8?q?reduce=20the=20logging=20when=20running=20in=20?= =?UTF-8?q?test=20mode,=20errors=20are=20expected=20as=20=E2=80=A6=20(#983?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * reduce the logging when running in test mode, errors are expected as part of tests * fix the code, thanks rubocop --- app/controllers/proxy_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/proxy_controller.rb b/app/controllers/proxy_controller.rb index 7cede1380..ad208a0d7 100644 --- a/app/controllers/proxy_controller.rb +++ b/app/controllers/proxy_controller.rb @@ -30,7 +30,7 @@ def fetch connection = Faraday.new(url: url_without_path) do |faraday| # Configure the connection options, such as headers or middleware faraday.response :follow_redirects - faraday.response :logger, nil, { headers: proxy_debug, bodies: proxy_debug, errors: true } + faraday.response :logger, nil, { headers: proxy_debug, bodies: proxy_debug, errors: !Rails.env.test? } faraday.ssl.verify = false faraday.request :url_encoded