Closed rbalint closed 3 years ago
Thanks for your pull request. I am a bit hesitant to merge it, because I don't like the idea to override system environment variables in a test script. This test was successfully executed on many different machines and OS without any problems, see http://matrix.cpantesters.org/?dist=Catmandu-SRU+0.428. @nics, @phochste, @Corion: what do you think?
If this is for a test with a local HTTP server, one should remove proxies. Test::HTTP::LocalServer (claims to) clear the relevant/interfering environment variables, so this change should not be necessary.
If this is necessary, there are at least two more environment variables to clean out:
$ENV{ HTTP_PROXY }
$ENV{ HTTPS_PROXY }
In general don't see an immediate harm overwriting environment variables in a test script. It has no effect outside the test environment, only within the execution context of that test script. I don't know about this specific case if it is needed and follow @Corion.
Ubuntu's autopkgtest infrastructure sets it, but not for accessing localhost.