aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_cdp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_cdp.py')
-rw-r--r--test/test_cdp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_cdp.py b/test/test_cdp.py
index ac42bf084a2..e8ced7cb796 100644
--- a/test/test_cdp.py
+++ b/test/test_cdp.py
@@ -86,9 +86,10 @@ class TestCDP(VppTestCase):
self.assertTrue(neighbors, "CDP didn't register neighbor")
port, system = neighbors[0]
+ length = min(len(system), len(self.device_id))
self.assert_equal(port, self.port_id, "CDP received invalid port id")
- self.assert_equal(system, self.device_id,
+ self.assert_equal(system[:length], self.device_id[:length],
"CDP received invalid device id")
def test_cdp_underflow_tlv(self):