Debug iptables rules in tests

Change-Id: I370a403aef30dc42f3d614c5882138dac4f41ec8
This commit is contained in:
Colleen Murphy 2019-03-23 23:36:42 +01:00
parent 6c72d6e883
commit daad5e0ec6
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ trusted-host = mirror.dfw.rax.openstack.org
extra-index-url = http://mirror.dfw.rax.openstack.org/wheel/ubuntu-14.04-x86_64
EOF
shell("if [ ! -f /etc/pip.conf ] ; then echo '#{pip_conf}' > /etc/pip.conf ; fi")
shell("iptables -S")
# Block pypi.python.org so we know the mirror is working
shell("iptables -A OUTPUT -d pypi.python.org -j DROP")
@ -41,6 +42,7 @@ EOF
context 'without mirrors' do
before :all do
shell("iptables -S")
shell("iptables -D OUTPUT -d pypi.python.org -j DROP")
shell("rm /etc/pip.conf")
end