From: Vincent Bernat Date: Mon, 12 Mar 2018 16:51:28 +0000 (+0100) Subject: test: add test for new portdescription setting X-Git-Tag: 1.0.0~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5dd953f435ce9c9e5b9c34ad3b37bb11db80a740;p=thirdparty%2Flldpd.git test: add test for new portdescription setting --- diff --git a/NEWS b/NEWS index f40ba0f3..2c3760d8 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ lldpd (1.0.0) * Changes: + Chassis ID can be set to an arbitrary value with "configure system chassisid". + + Port description can be overriden directly with "configure lldp + portdescription". * Fix: + Ensure chassis-related changes are propagated immediately. + Ensure management address change is correctly detected. diff --git a/tests/integration/test_basic.py b/tests/integration/test_basic.py index d26f8c88..ae415040 100644 --- a/tests/integration/test_basic.py +++ b/tests/integration/test_basic.py @@ -244,6 +244,16 @@ def test_portid_subtype_local_with_description(lldpd1, lldpd, lldpcli, namespace assert out["lldp.eth0.port.descr"] == "localdescription" +def test_portdescription(lldpd1, lldpd, lldpcli, namespaces): + with namespaces(2): + lldpd() + lldpcli("configure", "lldp", "portdescription", "localdescription") + time.sleep(3) + with namespaces(1): + out = lldpcli("-f", "keyvalue", "show", "neighbors") + assert out["lldp.eth0.port.descr"] == "localdescription" + + def test_portid_subtype_local_with_alias(lldpd1, lldpd, lldpcli, namespaces): with namespaces(2): ipr = pyroute2.IPRoute()