[openstack-dev] Removing internet access from unit test gates

Thomas Goirand zigo at debian.org
Tue Nov 21 08:28:20 UTC 2017


Hi everyone!

I believe all distributions are running unit tests of packages, either
at build time, or later on (for example in autopkgtest). In Debian, it's
done mostly at build time. There it's forbidden to access internet, and
on purpose, Debian buildd servers wont provide internet access when
building.

Unfortunately, a number of OpenStack packages have internet accessing
unit tests. I believe this is by mistake, or lack of knowledge of some
upstream developers. It's unfortunately often discovered after the
facts, like for example https://bugs.debian.org/882266 (note: no finger
pointing here, this is just yet another instance of the issue and just
an example out of many others, and probably the first time in Horizon).

One easy way, at least in python, is to define the environment variables:

http_proxy=127.0.0.1:9
https_proxy=127.0.0.9:9
HTTP_PROXY=127.0.0.1:9
HTTPS_PROXY=127.0.0.1:9

This way, no way to do an accidental implementation mistake.

This is of course not desirable under the functional/integration testing
environment.

The only way that I see going forward, is having internet access removed
from unit tests in the gate, or probably just the above variables set.

Your thoughts?

Cheers,

Thomas Goirand (zigo)



More information about the OpenStack-dev mailing list