summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-22 15:48:21 +0200
committerGitHub <noreply@github.com>2024-01-22 15:48:21 +0200
commitfd4838266592448ea1be9ed693e297300ea7b1d2 (patch)
tree3edc0163477ad38acff90a7da6a4b9109c5f5b22 /smoketest/scripts/cli
parent7f7cf25cdd84da7c2b99c0913e5ba25d999b3978 (diff)
parentca1ad197eb7f9cb8352747dd0ad078366154faaf (diff)
downloadvyos-1x-fd4838266592448ea1be9ed693e297300ea7b1d2.tar.gz
vyos-1x-fd4838266592448ea1be9ed693e297300ea7b1d2.zip
Merge pull request #2874 from vyos/mergify/bp/sagitta/pr-2867
ethernet: T4638: add smoketests verifying there are no stale VLAN interfaces left (backport #2867)
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_ethernet.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py
index a39b81348..e414f18cb 100755
--- a/smoketest/scripts/cli/test_interfaces_ethernet.py
+++ b/smoketest/scripts/cli/test_interfaces_ethernet.py
@@ -141,15 +141,18 @@ class EthernetInterfaceTest(BasicInterfaceTest.TestCase):
# Verify that no address remains on the system as this is an eternal
# interface.
- for intf in self._interfaces:
- self.assertNotIn(AF_INET, ifaddresses(intf))
+ for interface in self._interfaces:
+ self.assertNotIn(AF_INET, ifaddresses(interface))
# required for IPv6 link-local address
- self.assertIn(AF_INET6, ifaddresses(intf))
- for addr in ifaddresses(intf)[AF_INET6]:
+ self.assertIn(AF_INET6, ifaddresses(interface))
+ for addr in ifaddresses(interface)[AF_INET6]:
# checking link local addresses makes no sense
if is_ipv6_link_local(addr['addr']):
continue
- self.assertFalse(is_intf_addr_assigned(intf, addr['addr']))
+ self.assertFalse(is_intf_addr_assigned(interface, addr['addr']))
+ # Ensure no VLAN interfaces are left behind
+ tmp = [x for x in Section.interfaces('ethernet') if x.startswith(f'{interface}.')]
+ self.assertListEqual(tmp, [])
def test_offloading_rps(self):
# enable RPS on all available CPUs, RPS works with a CPU bitmask,