From 36629c88ccdf856a79627a710ff34a6f5a47cee4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 17 Feb 2020 21:08:25 +0100 Subject: ethernet: generic tearDown() should not destroy ethernet CLI nodes --- scripts/cli/base_interfaces_test.py | 10 ++++++++-- 1 file 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): -- cgit v1.2.3