From 5cb935fc1d86c9a2ae61c7406425d0eed79dc87a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 7 Jan 2021 23:01:29 +0100 Subject: 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. --- smoketest/scripts/cli/test_interfaces_ethernet.py | 5 +++++ 1 file changed, 5 insertions(+) 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: -- cgit v1.2.3