]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
test: add test for new portdescription setting
authorVincent Bernat <vincent@bernat.im>
Mon, 12 Mar 2018 16:51:28 +0000 (17:51 +0100)
committerVincent Bernat <vincent@bernat.im>
Mon, 12 Mar 2018 16:52:18 +0000 (17:52 +0100)
NEWS
tests/integration/test_basic.py

diff --git a/NEWS b/NEWS
index f40ba0f34bd192eb26eceecdf0ff63cfcb63aab1..2c3760d8aedba1b5278ec2c549a685c2853d7486 100644 (file)
--- 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.
index d26f8c884e7ea59ef830cd2a7439527c5d655e12..ae41504003c5d46e9a409491eda2da69f458e2b0 100644 (file)
@@ -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()