diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-01-05 16:54:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-05 16:54:12 +0100 |
| commit | 1ff4f6d9f8fc6f8b5fafa78f985bb5880f384d76 (patch) | |
| tree | 62c1467961a4a16ea27ab5df3f2b9902439a75c6 /smoketest/scripts/cli | |
| parent | 06945f0a7079b72ab3844bec77288aea208ac266 (diff) | |
| parent | a5995051bc271907df66618dfb6d7afe62bab551 (diff) | |
| download | vyos-1x-1ff4f6d9f8fc6f8b5fafa78f985bb5880f384d76.tar.gz vyos-1x-1ff4f6d9f8fc6f8b5fafa78f985bb5880f384d76.zip | |
Merge pull request #4933 from c-po/eth-fix
ethernet: T8142: do not raise ValueError for non-existing interfaces
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_interfaces_ethernet.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py index 6d0b7b772..5b87bd9d1 100755 --- a/smoketest/scripts/cli/test_interfaces_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_ethernet.py @@ -154,16 +154,18 @@ class EthernetInterfaceTest(BasicInterfaceTest.TestCase): self.assertEqual(int(tmp), 0) def test_non_existing_interface(self): - unknonw_interface = self._base_path + ['eth667'] - self.cli_set(unknonw_interface) + unknonw_interface = 'eth667' + self.cli_set(self._base_path + [unknonw_interface]) # check validate() - interface does not exist - with self.assertRaises(ConfigSessionError): + with self.assertRaises(ConfigSessionError) as cm: self.cli_commit() + self.assertIn(f'Interface "{unknonw_interface}" does not exist!', + str(cm.exception)) # we need to remove this wrong interface from the configuration # manually, else tearDown() will have problem in commit() - self.cli_delete(unknonw_interface) + self.cli_delete(self._base_path + [unknonw_interface]) def test_speed_duplex_verify(self): for interface in self._interfaces: |
