From 30adfd5632e614cf84b6db012c5697b93aa10a08 Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Wed, 1 Jun 2016 13:41:25 -0700 Subject: [PATCH] tests: basic: Fail gracefully on firewall * Firewall was already configured, don't exit the unit test. --- tests/basic.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/basic.sh b/tests/basic.sh index 44ee4b1..40165db 100755 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -25,8 +25,8 @@ docker run --volumes-from $OVPN_DATA --rm $IMG ovpn_listclients | grep $CLIENT # # Fire up the server # -sudo iptables -N DOCKER -sudo iptables -I FORWARD -j DOCKER +sudo iptables -N DOCKER || echo 'Firewall already configured' +sudo iptables -I FORWARD -j DOCKER || echo 'Forward already configured' # run in shell bg to get logs docker run --name "ovpn-test" --volumes-from $OVPN_DATA --rm -p 1194:1194/udp --privileged $IMG &