summaryrefslogtreecommitdiff
path: root/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-19 08:47:31 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-19 08:47:31 +0100
commit74888b22f92abf7f10c8b0baddf815fb5d462897 (patch)
tree5df191be03747fe6978847c9508b1569879953c1 /scripts/cli
parentb6fd5d5799590c5069e1b34c0e0381c684bd94ce (diff)
downloadvyos-1x-74888b22f92abf7f10c8b0baddf815fb5d462897.tar.gz
vyos-1x-74888b22f92abf7f10c8b0baddf815fb5d462897.zip
tunnel: remove duplicated code
Diffstat (limited to 'scripts/cli')
-rwxr-xr-xscripts/cli/test_interfaces_tunnel.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/cli/test_interfaces_tunnel.py b/scripts/cli/test_interfaces_tunnel.py
index 01d6ff93b..f67bda702 100755
--- a/scripts/cli/test_interfaces_tunnel.py
+++ b/scripts/cli/test_interfaces_tunnel.py
@@ -15,10 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from base_interfaces_test import *
-
from vyos.ifconfig import Interface
-
class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
_base_path = ['interfaces', 'tunnel']
_interfaces = []
@@ -54,10 +52,9 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
self._test_mtu = True
super().setUp()
- self.session.set(['interfaces', 'dummy', 'dum444',
- 'address', '169.254.0.1/24'])
- self.session.set(
- ['interfaces', 'dummy', 'dum666', 'address', '2002::1/16'])
+ 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'])
self.session.commit()
local = {
@@ -77,6 +74,5 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest):
self.session.set(self._base_path + [intf, name, tunnel[name]])
number += 1
-
if __name__ == '__main__':
unittest.main()