File: proxy-safe-tests.patch

package info (click to toggle)
ruby-adsf 1.5.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 404 kB
  • sloc: ruby: 1,024; javascript: 976; makefile: 12
file content (20 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: fix test suite to work when a proxy environment is configured
 If http_proxy is set in the environment, test_non_local_interfaces fails
 because it tries to connect via the proxy when it should be connecting to
 a local server instead.  Simply remove this setting from the environment to
 let the test pass.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921486
Forwarded: not-needed
Last-Update: 2023-06-13

--- a/adsf/test/test_server.rb
+++ b/adsf/test/test_server.rb
@@ -172,6 +172,7 @@ class Adsf::Test::Server < Minitest::Tes
   end
 
   def test_non_local_interfaces
+    ENV.delete('http_proxy')
     addresses = Socket.getifaddrs.map(&:addr).select(&:ipv4?).map(&:ip_address)
     non_local_addresses = addresses - ['127.0.0.1']