summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-07 23:01:29 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-07 23:23:53 +0100
commit5cb935fc1d86c9a2ae61c7406425d0eed79dc87a (patch)
treea6386fc63e0b48745e5c31775a8f97b6e66b924a
parentaa7b5972d48ad05824bfffdf1c5df5a6c2b1e37b (diff)
downloadvyos-1x-5cb935fc1d86c9a2ae61c7406425d0eed79dc87a.tar.gz
vyos-1x-5cb935fc1d86c9a2ae61c7406425d0eed79dc87a.zip
smoketest: ethernet: check for error on non existing interface
When performing a commit on an ethernet interface that does not exist, e.g. eth667, verify an exception is raised.
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_ethernet.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py
index 3c4796283..971d965f5 100755
--- a/smoketest/scripts/cli/test_interfaces_ethernet.py
+++ b/smoketest/scripts/cli/test_interfaces_ethernet.py
@@ -123,6 +123,11 @@ class EthernetInterfaceTest(BasicInterfaceTest.BaseTest):
self.assertEqual(f'{cpus:x}', f'{rps_cpus:x}')
+ def test_non_existing_interface(self):
+ self.session.set(self._base_path + ['eth667'])
+ # check validate() - interface does not exist
+ with self.assertRaises(ConfigSessionError):
+ self.session.commit()
def test_eapol_support(self):
for interface in self._interfaces: