summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-26 07:39:44 +0100
committerGitHub <noreply@github.com>2020-02-26 07:39:44 +0100
commit0466dd70ef1db6a8e61ef7e5ba3d2ebfe92a9c64 (patch)
tree875dfdaf71f1cbb6101245ad09e112691d7521de /scripts
parente5acf008785066e2266a913703abb7b9f5e99286 (diff)
parent30965ed538d6b90e338c25c4c5bfe45cebdc1ce4 (diff)
downloadvyos-1x-0466dd70ef1db6a8e61ef7e5ba3d2ebfe92a9c64.tar.gz
vyos-1x-0466dd70ef1db6a8e61ef7e5ba3d2ebfe92a9c64.zip
Merge pull request #4 from thomas-mangin/correction
tunnel: tidying up
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cli/test_interfaces_tunnel.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/cli/test_interfaces_tunnel.py b/scripts/cli/test_interfaces_tunnel.py
index 980bfa726..8f8311511 100755
--- a/scripts/cli/test_interfaces_tunnel.py
+++ b/scripts/cli/test_interfaces_tunnel.py
@@ -17,10 +17,8 @@
from base_interfaces_test import BasicInterfaceTest
from vyos.ifconfig import Interface
-class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
- _base_path = ['interfaces', 'tunnel']
- _interfaces = []
+class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
# encoding, tunnel endpoint (v4/v6), address (v4/v6)
_valid = [
('gre', 4, 4),
@@ -47,11 +45,13 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
}
def setUp(self):
- for number in range(len(self._valid)):
- self._interfaces.append('tun%d' % (number+1))
- self._test_mtu = True
super().setUp()
+ self._base_path = ['interfaces', 'tunnel']
+ self._interfaces = ['tun%d' % (n+1) for n in range(len(self._valid))]
+ self._test_mtu = True
+
+ # creating two dummy interface as to use as local-ip for the tunnels
base_path = ['interfaces', 'dummy']
self.session.set(base_path + ['dum444', 'address', '169.254.0.1/24'])
self.session.set(base_path + ['dum666', 'address', '2002::1/16'])