Subject: | Fails test with proxy |
t/conditional_deserialization.t tries to connect to the loopback address, but if proxy environment variables are set it fails because it ends up asking the proxy for 127.0.0.1. Example failure:
t/conditional_deserialization.t .. 1/? Data was $VAR1 = [
'<!doctype html><title>Sphynx: Access Denied</title>
<body style=text-align:center><h1>Access has been denied!</h1><hr>
<p>Access to the page <p><a href="http://127.0.0.1:50541/plain">http://127.0.0.1:50541/plain</a>
<p>has been denied because it is not in the list.
<p style="position:absolute; right: 30px; bottom: 20px; font-size: 70%">Popeye.local'
];
at /Users/sprout/.cpan/build/Role-REST-Client-0.22-0/blib/lib/Role/REST/Client/Serializer.pm line 80.
Couldn't deserialize data with application/json: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!doctype html><titl...") at /Users/sprout/.cpan/build/Data-Serializer-0.60-0/blib/lib/Data/Serializer/JSON.pm line 17.
To avoid this, the test should clear the proxy environment variables, which are:
HTTP_PROXY
HTTPS_PROXY
http_proxy