Bug#899263: libanyevent-yubico-perl: Make autopkgtests proxy-safe

Steve Langasek steve.langasek at canonical.com
Mon May 21 21:39:57 BST 2018


Package: libanyevent-yubico-perl
Version: 0.9.3-1
Severity: minor
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch autopkgtest

Dear maintainers,

The libanyevent-yubico-perl autopkgtests pass NO_INTERNET=1 in the
environment, which is probably sensible if you want the autopkgtests to be
maximally portable, and to not fail due to network resource failures outside
of your control.  However, the autopkgtests still fail on Ubuntu's
infrastructure with this error:

[...]
autopkgtest [01:38:59]: test command1: [-----------------------
t/AnyEvent-Yubico.t .. 
1..6
ok 1 - use AnyEvent::Yubico;
ok 2 - new() works
ok 3 - sign() works
not ok 4 - invalid URL

#   Failed test 'invalid URL'
#   at t/AnyEvent-Yubico.t line 40.
#          got: 'Bad Request'
#     expected: 'Connection refused'
ok 5 - timeout
[...]

  (http://autopkgtest.ubuntu.com/packages/liba/libanyevent-yubico-perl/cosmic/amd64)

This is because the Ubuntu autopkgtest infrastructure does have Internet
access, but it's proxied; therefore, an attempt to connect to
http://127.0.0.1:0 in this test respects the proxy setting, and therefore
fails because the API call gets a 'Bad Request' instead of a 'Connection
refused'.

Perhaps you could argue that the proxy environment is misconfigured because
127.0.0.1 is not excluded, but given that these tests should not hit the
network anyway, it seems more straightforward to me to simply clean the
proxy settings from the environment than to dictate additional constraints
on the autopkgtest environments.

The attached patch has been uploaded to Ubuntu, allowing the autopkgtests to
now pass there.  Please consider applying this patch in Debian as well.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru libanyevent-yubico-perl-0.9.3/debian/tests/pkg-perl/smoke-env libanyevent-yubico-perl-0.9.3/debian/tests/pkg-perl/smoke-env
--- libanyevent-yubico-perl-0.9.3/debian/tests/pkg-perl/smoke-env	2016-06-05 05:56:41.000000000 -0700
+++ libanyevent-yubico-perl-0.9.3/debian/tests/pkg-perl/smoke-env	2018-05-21 10:50:14.000000000 -0700
@@ -1 +1,3 @@
+http_proxy=
+https_proxy=
 NO_INTERNET=1


More information about the pkg-perl-maintainers mailing list