File: unset-http-proxy-for-tests

package info (click to toggle)
libwww-mechanize-shell-perl 0.59-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 600 kB
  • sloc: perl: 3,325; makefile: 5
file content (33 lines) | stat: -rw-r--r-- 1,010 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Unset HTTP proxy env variables when running tests
 Some tests would fail when run in an environment that has HTTP proxy
 environment variables. For the tests that failed, we now unset the HTTP proxy
 variables.
Bug: https://github.com/Corion/WWW-Mechanize-Shell/pull/6
Bug-Ubuntu: https://launchpad.net/bugs/1953344
Forwarded: https://github.com/Corion/WWW-Mechanize-Shell/pull/6
Author: Olivier Gayot <olivier.gayot@canonical.com>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2021-12-06

--- a/t/13-command-au.t
+++ b/t/13-command-au.t
@@ -18,6 +18,8 @@
 
 use WWW::Mechanize::Shell;
 
+delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
+
 my $server = Test::HTTP::LocalServer->spawn();
 
 my $user = 'foo';
--- a/t/18-browser-autosync.t
+++ b/t/18-browser-autosync.t
@@ -25,6 +25,8 @@
 };
 use WWW::Mechanize::Shell;
 
+delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
+
 my $browser_synced;
 { no warnings 'redefine';
   *WWW::Mechanize::Shell::sync_browser = sub {