From 505c3e2bb067ef08b07dba7e7ab081ed6a049db5 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 18 Jan 2024 12:20:30 +0000 Subject: [PATCH 1/2] make dns tests pass even when there's a proxy configured --- t/14_dns_client_errors.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/14_dns_client_errors.t b/t/14_dns_client_errors.t index 0dec7f84a1..fa54d27eb9 100644 --- a/t/14_dns_client_errors.t +++ b/t/14_dns_client_errors.t @@ -12,6 +12,11 @@ use Test::CustomCredentials; my $match_message_tests = $ENV{CI}; +# proxies can interfere with this test, because the connection will +# succeed (to the proxy), the proxy may return some error page, so +# we're getting InvalidContent instead of ConnectionError +delete local @ENV{qw(http_proxy https_proxy HTTP_PROXY HTTPS_PROXY)}; + my $closed_server_endpoint = 'http://unresolvable.example.com'; my $p = Paws->new(config => { credentials => 'Test::CustomCredentials' }); From 9f12beab1f74346660b8bff640a4645dca784597 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 18 Jan 2024 16:06:08 +0000 Subject: [PATCH 2/2] apply proxy work-around to more tests --- t/13_client_connect_errors.t | 5 +++++ t/15_timeouts.t | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/t/13_client_connect_errors.t b/t/13_client_connect_errors.t index 3fe568b1cb..13320e51b0 100644 --- a/t/13_client_connect_errors.t +++ b/t/13_client_connect_errors.t @@ -12,6 +12,11 @@ use Test::CustomCredentials; my $match_message_tests = $ENV{CI}; +# proxies can interfere with this test, because the connection will +# succeed (to the proxy), the proxy may return some error page, so +# we're getting InvalidContent instead of ConnectionError +delete local @ENV{qw(http_proxy https_proxy HTTP_PROXY HTTPS_PROXY)}; + my $closed_server_endpoint = 'http://localhost:65511'; my $p = Paws->new(config => { credentials => 'Test::CustomCredentials' }); diff --git a/t/15_timeouts.t b/t/15_timeouts.t index e346a7a675..9576f90a19 100644 --- a/t/15_timeouts.t +++ b/t/15_timeouts.t @@ -22,6 +22,11 @@ my $sock = IO::Socket::INET->new(Listen => 5, LocalPort => 9000, Proto => 'tcp'); +# proxies can interfere with this test, because the connection will +# succeed (to the proxy), the proxy may return some error page, so +# we're getting InvalidContent instead of ConnectionError +delete local @ENV{qw(http_proxy https_proxy HTTP_PROXY HTTPS_PROXY)}; + my $closed_server_endpoint = 'http://localhost:9000'; my $p = Paws->new(config => { credentials => 'Test::CustomCredentials' });