summaryrefslogtreecommitdiff
path: root/tests/e2e/check_ip
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-28 11:00:30 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:49 -0400
commit04bce963c2314dc9b21bd86224e75c22aae39d70 (patch)
tree736153ff8d812b5402415e6ccc1854953754d81c /tests/e2e/check_ip
parent8ba14779884b2d1913de1ae4abf6fdeea130838a (diff)
[tests] fix check-ip script
Diffstat (limited to 'tests/e2e/check_ip')
-rwxr-xr-xtests/e2e/check_ip9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/e2e/check_ip b/tests/e2e/check_ip
index 8a45f2c5..662ab2f0 100755
--- a/tests/e2e/check_ip
+++ b/tests/e2e/check_ip
@@ -4,7 +4,7 @@ import urllib.request
import json
import sys
-DEMO_ISPS = ('Riseup Networks', '')
+DEMO_ISPS = ('Riseup Networks',)
url = 'https://wtfismyip.com/json'
@@ -26,9 +26,9 @@ try:
cmd = sys.argv[1]
if cmd == 'vpn_on':
- assert isp == DEMO_ISP
+ assert isp in DEMO_ISPS
elif cmd == 'vpn_off':
- assert isp != DEMO_ISP
+ assert isp not in DEMO_ISPS
else:
raise BadCmd()
@@ -36,8 +36,9 @@ except BadCmd:
print("Cannot parse that command. Valid commands: vpn_on, vpn_off")
sys.exit(1)
-except Exception:
+except Exception as exc:
print("IP *NOT* as expected")
+ print("%r" % exc)
sys.exit(1)
else: