summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-17 21:08:25 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-17 21:08:25 +0100
commit36629c88ccdf856a79627a710ff34a6f5a47cee4 (patch)
treea9c8a49e1e4fb78356c6e431553a6ccc68f80333 /scripts
parent83597a5f435703595d42cef4839acad6a341c6ec (diff)
downloadvyos-1x-36629c88ccdf856a79627a710ff34a6f5a47cee4.tar.gz
vyos-1x-36629c88ccdf856a79627a710ff34a6f5a47cee4.zip
ethernet: generic tearDown() should not destroy ethernet CLI nodes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cli/base_interfaces_test.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/cli/base_interfaces_test.py b/scripts/cli/base_interfaces_test.py
index 885995fb8..6c558795a 100644
--- a/scripts/cli/base_interfaces_test.py
+++ b/scripts/cli/base_interfaces_test.py
@@ -32,9 +32,15 @@ class BasicInterfaceTest:
self._test_mtu = False
def tearDown(self):
- self.session.delete(self._base_path)
- self.session.commit()
+ # we should not remove ethernet from the overall CLI
+ if 'ethernet' in self._base_path:
+ self.session.delete(self._base_path)
+ for intf in self._interfaces:
+ self.session.set(self._base_path + [intf])
+ else:
+ self.session.delete(self._base_path)
+ self.session.commit()
del self.session
def test_add_description(self):