From: Vincent Bernat Date: Sat, 1 Feb 2020 15:44:41 +0000 (+0100) Subject: tests: check we don't mix VLAN among interfaces X-Git-Tag: 1.0.5~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24e8fda8fa36815cb0a83c86eb1bf6c705ad47a2;p=thirdparty%2Flldpd.git tests: check we don't mix VLAN among interfaces --- diff --git a/tests/integration/test_interfaces.py b/tests/integration/test_interfaces.py index 29d7ad4f..1e34d08f 100644 --- a/tests/integration/test_interfaces.py +++ b/tests/integration/test_interfaces.py @@ -68,6 +68,8 @@ def test_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): def test_vlan_aware_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): links(namespaces(3), namespaces(2)) # Another link to setup a bridge + with namespaces(3): + lldpd() with namespaces(2): if when == 'after': lldpd() @@ -75,6 +77,7 @@ def test_vlan_aware_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, links.bridge_vlan('eth1', 100, pvid=True) links.bridge_vlan('eth1', 200) links.bridge_vlan('eth1', 300) + links.bridge_vlan('eth3', 400) if when == 'before': lldpd() else: @@ -88,6 +91,15 @@ def test_vlan_aware_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, ['100', '200', '300'] assert out['lldp.eth0.vlan.pvid'] == \ ['yes', 'no', 'no'] + with namespaces(3): + out = lldpcli("-f", "keyvalue", "show", "neighbors", "details") + assert out['lldp.eth2.port.descr'] == 'eth3' + assert out['lldp.eth2.vlan'] == \ + 'vlan400' + assert out['lldp.eth2.vlan.vlan-id'] == \ + '400' + assert out['lldp.eth2.vlan.pvid'] == \ + 'no' @pytest.mark.skipif("'Dot3' not in config.lldpd.features",